Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Being able to supress exception raised on 404 #17

Open
asafblum opened this issue May 25, 2016 · 2 comments
Open

Being able to supress exception raised on 404 #17

asafblum opened this issue May 25, 2016 · 2 comments

Comments

@asafblum
Copy link

when api returns 404 the base.rb raises a RecordNotFound exception probably return nil is a better return value for Ambassador::Find Call , when auto_create is 0 @chaselee what do you think ?

@chaselee
Copy link
Contributor

Hey @asafblum! What do you think about passing an option in to the find method that flows through to call in base.rb to suppress the exceptions and instead just return response['errors']['error'] when there's a non-200 response? would that work here? is there a reason you don't want to catch the exception as a way of handling this case?

@asafblum
Copy link
Author

@chaselee sounds very good to me. I think that 500 error should raise an error. but 404 is a valid response for searching at least in my case... tried to create a pull request but I was unable to run the rspec for some reason.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants