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
{{ message }}
Repository navigation
ODataError generates generic (i.e."empty") .Error() in some cases #313
returned error status code received from the API and type being *odataerrors.ODataError which embeds ApiError type, yet doesn't set it in some cases (ApiError generates generic message like above when Message is zero length.
// ODataError typeODataErrorstruct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.additionalDatamap[string]interface{}
// The error propertyerrorMainErrorable
}
In the end to extract actual error message I needed to do
Consolidating multiple issues here for clarity with #334 and #370.
Part of the issue lies in the serialization and metadata being inaccurate as Ronald K (@rkodev) mentioned "this is the case for the given issue, the returned error from the api is innererror as opposed to innerError"
Part of the enhancement request is that assuming the serialization issue is fixed, the standard Error() behavior is not supported due to the way the code is generated today and we should probably review this.
Activity
rkodev commentedon Nov 17, 2022
Hi XANi (@XANi) Thanks for trying out the SDK, we are currently reviewing this error format in order to improve on this.
ApiErrorembedded in the error response as this does seem to not to always have the error.Error()returns the error that was experiencedbaywet commentedon Jan 24, 2023
Consolidating multiple issues here for clarity with #334 and #370.
Part of the issue lies in the serialization and metadata being inaccurate as Ronald K (@rkodev) mentioned "this is the case for the given issue, the returned error from the api is innererror as opposed to innerError"
Part of the enhancement request is that assuming the serialization issue is fixed, the standard Error() behavior is not supported due to the way the code is generated today and we should probably review this.
rkodev commentedon Apr 12, 2023
Hi XANi (@XANi) , This issue is resolved as tested in version 0.61.0 of the sdk