ruby-ambassador
ruby-ambassador copied to clipboard
Being able to supress exception raised on 404
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 ?
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?
@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.