I would pass something meaningful to the exception, like a description of what happened. if you raise ResourceNotFoundException("an error happened") it will result in a 404 response with that description in the "detail" attribute