OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

REST APIs should throw error in same format

Open darth-coder00 opened this issue 5 years ago • 1 comments

For instance, we are getting error for api /api/v1/services/{service-name}/{id} as below

{
    message: "{some error message}"
}

which is readable on client-side, but for api /api/v1/services/{service-type} it gives whole Java exception as error

Error: Request failed with status code 400
    at createError (createError.js?2d83:16)
    at settle (settle.js?467f:17)
    at XMLHttpRequest.handleLoad (xhr.js?b50d:62)

which is not readable on client-side

Expected: All APIs should give errors in same format that is readable on client-side, either JSON or String

darth-coder00 avatar Oct 05 '21 03:10 darth-coder00

@darth-coder00, this is no longer relevant, right? Can we close this?

sureshms avatar Jan 05 '22 05:01 sureshms