alexander-mathieu / crowdhound_be

Crowdhound connects dog owners with local people that would love the opportunity to chill with a dog for an afternoon or a few days, without having the responsibility 24/7/365.
https://crowdhound.herokuapp.com/
1 stars 1 forks source link

Rescue ActiveRecord::RecordNotFound with 404 #22

Closed chakeresa closed 5 years ago

chakeresa commented 5 years ago

Currently, if you search for a dog or user by id and provide an id that doesn't exist, you get a 500 error. Need to figure out how to catch that error and provide a 404 instead.

chakeresa commented 5 years ago

Actually, GraphQL always responds with a 200. The error is handled automatically and a descriptive message is sent to the user making the request.