Base solution for your next web application
Open Closed

How we show a proper error in user readable format #308


User avatar
0
abu created

how we make following error example:

  1. internal error
  2. your request is not valid. etc etc

in readable format to the user what the error is and where it present..???

please help

thank you


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    End users can not understand every exception. That's why ABP hides exception details by default. If you wan to show a specific message, throw UserFriendlyException which is not hided by ABP.

    Also, you can override some functions in the client side to show errors in your own format. Example:

    abp.ng.http.showError = function (error) {
                if (error.details) {
                    return abp.message.error(error.details, error.message);
                } else {
                    return abp.message.error(error.message);
                }
            };
    

    this is the default implementation. You can change it.