her: No way to handle 404s?

Is there a way to handle 404 status codes when an object was not found on the other side?

Say that we have a model Post and we have set things up so that we can call Post.find(1) and there is not Post object with id=1 on the other side. Let’s say the other API returns nil and status code 404. Her doesn’t seem to consider the status code and rather complains with an error about the nil. What is the right way to handle such situations?

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 20 (5 by maintainers)

Most upvoted comments

Did this conversation go any further? Found myself bumping up against it today, expecting find(unknown id) to Raise an exception but it swallows it.