-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Ingest Manager] [Discuss] success property in API responses #73221
Comments
Pinging @elastic/ingest-management (Team:Ingest Management) |
I am in favor if removing it. Relying on status code is probably a lot better (and we are already doing it) |
I opened a draft PR after doing a find/replace for all but check-permissions #73223 |
Pinging @elastic/endpoint-management (Team:Endpoint Management) |
Did a quick search in |
Closing the discussion part of this. Implementation started in #73223 |
After some searching,
${API_ROOT}/check-permissions
is the only route I can find where an API response hassuccess: false
at the top-level.The other 30+
success: boolean
s seem to only besuccess: true
. Our tests seem to only include thetrue
case and after confirming a200
response.success: false
is not in many (most? any?) errors. We don't include it in ourresponse.customError
orresponse.notFound
options and it's not included by the platform.e.g. 404
I see some references to it in the client-side code but I haven't dug into them. Perhaps they never receive
false
. These could/would be updated to usetry/catch
forawait
or the.catch
if using the Promise.Questions
Do we need/want this property?
Should we add more
success: false
or can we remove it as a default/required top-level response property?The text was updated successfully, but these errors were encountered: