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'
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'