You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could not find an existing bug on this, so apologies if there is.
Most models have their own definition of an ErrorResponse and ErrorDetails. As near as I can tell the structure is mostly identical. (Deployment errors include a status, but that's the only difference I have seen thus far.)
The errors returned by Azure all appear to follow this style.
{
"error": {
"code": "BadRequest",
"message": "There was a bad request",
"details": [{
"code": "NestedBadRequest",
"message": "{ \"error\": ... }"
}]
}
}
It would be great if there was a unified way to handle errors. My own needs are simply to display the error to the user, but I am sure there are others. My example above showed a complex example, which I see quite often. The error contains an embedded (serialized) ErrorDetails in the message of a detail's message. One has to keep deserializing the JSON to get all of the errors that made up the change.
The text was updated successfully, but these errors were encountered:
Hello @boumenot !
I think we can do better with the error unmarshaling, yes. If you happen to have a fix for this, PRs are always welcome. In all cases, @marstr will take a look at this.
I could not find an existing bug on this, so apologies if there is.
Most models have their own definition of an ErrorResponse and ErrorDetails. As near as I can tell the structure is mostly identical. (Deployment errors include a status, but that's the only difference I have seen thus far.)
The errors returned by Azure all appear to follow this style.
It would be great if there was a unified way to handle errors. My own needs are simply to display the error to the user, but I am sure there are others. My example above showed a complex example, which I see quite often. The error contains an embedded (serialized) ErrorDetails in the message of a detail's message. One has to keep deserializing the JSON to get all of the errors that made up the change.
The text was updated successfully, but these errors were encountered: