How can I change the messages generated by postgresql by default. Example errorcode 42501 permission denied for relation users what errorcode 42501 does not have permissions
How can I change the messages generated by postgresql by default. Example errorcode 42501 permission denied for relation users what errorcode 42501 does not have permissions
You should create a try-catch structure in the functions you use to capture the errors and display a personalized message for each case if you do not want the default exception to come out (This example is done in java to give an example of the structure):
try{
//Hacemos una query para recoger categorías(por ejemplo)
catch(Exception e){
//Mensaje personalizado
System.err.println("Ha sucedido un error al recoger categorías");
//Mensaje Generico
e.printStackTrace();
}