Skip to content

Add logic to not return error in DeleteUser when no user is found #80

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

Merged
merged 2 commits into from
May 3, 2022

Conversation

jonathanheaden
Copy link
Contributor

The response when a user does not exist is: something like:

{"status":500,"code":"1001","name":"INTERNAL_SERVER_ERROR","message":"could not delete user:, err: "User does not exist"","context":{}}
It really should be a 404, but to change the api would be a breaking-change. Instead, we should parse the response and return an err only if the RequestAPI returns an error and the response does not contain "User does not exist".

@denis-codefresh
Copy link
Collaborator

Looks good to me. Just make the indentation to match the surrounding code and we are good to merge.

Fix whitespace as per feedback

Co-authored-by: Denis Melnik <[email protected]>
@denis-codefresh denis-codefresh merged commit 6225574 into codefresh-io:master May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants