We should try to do a better job bubbling up helpful error messages from Portal or the Reporting service.
An example where we can improve:
https://github.com/geocortex/vertigis-reporting-client-py/blob/a9a2d7e3ea550f7de03370ac76ce9b7e84c358cf/geocortex/reporting/client/reporting_service.py#L44-L54
If an invalid token is provided above, the Reporting service will return a 400 level status code, as well as some helpful information in the body of the response such as:
{
"error": {
"id": "GR001.400",
"message": "GR001.400: Bad Request",
"status": 400
},
"log": {
"start": "2020-10-30T22:02:47.1033669Z",
"end": "2020-10-30T22:04:32.8250784Z",
"artifacts": [
{
"$type": "JobReferenceError",
"id": "ef814dc6295e4486bda2c372228a9e76",
"error": {
"$type": "Models.PortalError",
"code": 498,
"message": "Invalid token.",
"details": []
}
}
],
"traces": [
"Information: 0: An external error occured: ef814dc6295e4486bda2c372228a9e76"
]
}
}
We should try to bubble up some of this useful information to help developers debug the issue. There are likely a couple other places beyond the example above where we could also improve the error handling.
We should try to do a better job bubbling up helpful error messages from Portal or the Reporting service.
An example where we can improve:
https://github.com/geocortex/vertigis-reporting-client-py/blob/a9a2d7e3ea550f7de03370ac76ce9b7e84c358cf/geocortex/reporting/client/reporting_service.py#L44-L54
If an invalid token is provided above, the Reporting service will return a 400 level status code, as well as some helpful information in the body of the response such as:
{ "error": { "id": "GR001.400", "message": "GR001.400: Bad Request", "status": 400 }, "log": { "start": "2020-10-30T22:02:47.1033669Z", "end": "2020-10-30T22:04:32.8250784Z", "artifacts": [ { "$type": "JobReferenceError", "id": "ef814dc6295e4486bda2c372228a9e76", "error": { "$type": "Models.PortalError", "code": 498, "message": "Invalid token.", "details": [] } } ], "traces": [ "Information: 0: An external error occured: ef814dc6295e4486bda2c372228a9e76" ] } }We should try to bubble up some of this useful information to help developers debug the issue. There are likely a couple other places beyond the example above where we could also improve the error handling.