-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: respond with proper error message if user not found
- Loading branch information
1 parent
539f1c6
commit 10cc698
Showing
2 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit 10cc698
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we're using those keys when the request fails since we were not handling the errors at all previously, so I've removed the extra (unneeded) keys and just passed the error messages.
The
is_developer
andadmin
keys in the hash have duplicated logic. I would personally extract them into adefault_opts
hash and merge the new keys in based on the response. In this case, we want to avoid code duplication so that we avoid the case where some one changes one of the hash and forgets about the other in the future.