-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix #find_or_create_professor
#10
Conversation
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.
👋 @grmnlrt you need to change the condition at the end of L234 otherwise we won't enter the rescue
, right?
Line 234 in 9ba62d2
raise Response::Error, Response::Error::PROFESSOR_NOT_FOUND_ERROR_MESSAGE if response.message == "professor not found" |
💡 Maybe we could use the existing PROFESSOR_NOT_FOUND_ERROR_MESSAGE
instead of adding a new constant?
Oops sorry :/ |
@grmnlrt your should be able to re-push on the branch and reopen the PR |
I tried it locally with a binding.pry and I was entering the rescue properly🤔 I guess know when we make the request with a wrong email the status return by API is "error" |
Just retried locally and the line 234 isn't reached, the error is raise at L233 so I think we should keep it like this |
Edusign API now returns the following error when we try to find a professor who doesn't exist by email 👇
I referenced this error in a new constant in
Response::Error::CANNOT_GET_PROFESSOR_BY_EMAIL_ERROR_MESSAGE
and stoped rising an error when the API return this message.