It will if you set settings.DEBUG = True, but we don't have that enabled in production. Tastypie does let you override the default error message (settings.TASTYPIE_CANNED_ERROR), but that's global.
I think the cleaner solution would be to override _handle_500 and checking to see if `exception` is an instance of NOT_FOUND_EXCEPTIONS (see tastypie/resources.py:277). If it isn't, call the parent _handle_500. If it is, return self.error_response(request, {'error_message': 'your error goes here'}, response_class=HttpResponseNotFound).
It will if you set settings.DEBUG = True, but we don't have that enabled in production. Tastypie does let you override the default error message (settings. TASTYPIE_ CANNED_ ERROR), but that's global.
I think the cleaner solution would be to override _handle_500 and checking to see if `exception` is an instance of NOT_FOUND_ EXCEPTIONS (see tastypie/ resources. py:277) . If it isn't, call the parent _handle_500. If it is, return self.error_ response( request, {'error_message': 'your error goes here'}, response_ class=HttpRespo nseNotFound) .