orppst / pst-gui

web based front end for the tool
Mozilla Public License 2.0
0 stars 0 forks source link

get relevant error message #113

Closed DJWalker42 closed 2 months ago

DJWalker42 commented 3 months ago

Error messages from the API have the format:

{message: "", name: "", stack: {...}}

The 'message' here is not the root cause of the problem, and is a general description of the problem, typically "Network error" or "Internal Server Error". The root cause message is in the object named 'stack', which has the following format:

{exceptionType: "", message: "", statusCode: N} - where N is the relevant internet error code.

The 'getErrorMessage' utility function does not account for the 'stack' and simply returns the message at the top level. We should improve that function to get at the error message in the 'stack'