{"action":"created","issue":{"url":"https://api.github.com/repos/nicolaiarocci/eve/issues/822","repository_url":"https://api.github.com/repos/nicolaiarocci/eve","labels_url":"https://api.github.com/repos/nicolaiarocci/eve/issues/822/labels{/name}","comments_url":"https://api.github.com/repos/nicolaiarocci/eve/issues/822/comments","events_url":"https://api.github.com/repos/nicolaiarocci/eve/issues/822/events","html_url":"https://github.com/nicolaiarocci/eve/issues/822","id":132825357,"number":822,"title":"on_post hooks not triggered when by 500 responses","user":{"login":"mcreenan","id":118732,"avatar_url":"https://avatars.githubusercontent.com/u/118732?v=3","gravatar_id":"","url":"https://api.github.com/users/mcreenan","html_url":"https://github.com/mcreenan","followers_url":"https://api.github.com/users/mcreenan/followers","following_url":"https://api.github.com/users/mcreenan/following{/other_user}","gists_url":"https://api.github.com/users/mcreenan/gists{/gist_id}","starred_url":"https://api.github.com/users/mcreenan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcreenan/subscriptions","organizations_url":"https://api.github.com/users/mcreenan/orgs","repos_url":"https://api.github.com/users/mcreenan/repos","events_url":"https://api.github.com/users/mcreenan/events{/privacy}","received_events_url":"https://api.github.com/users/mcreenan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-10T21:42:25Z","updated_at":"2016-02-11T14:13:47Z","closed_at":null,"body":"I have an on_post hook setup for each http method which logs information about the request and response to an external service.\r\n\r\nFor most requests, this works fine.\r\n\r\nHowever, if I do a POST with resource that fails a unique constraint in mongo, Eve returns a 500 error like such:\r\n\r\n```\r\n   <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\r\n   <title>500 Internal Server Error</title>\r\n   <h1>Internal Server Error</h1>\r\n   <p>pymongo.errors.OperationFailure: batch op errors occurred</p>\r\n```\r\n\r\nThe on_post_POST hook I have is ignored.\r\n\r\nIt appears any time the abort method is used within Eve, it basically bombs out and any hooks that would normally execute will not be reached."},"comment":{"url":"https://api.github.com/repos/nicolaiarocci/eve/issues/comments/182881088","html_url":"https://github.com/nicolaiarocci/eve/issues/822#issuecomment-182881088","issue_url":"https://api.github.com/repos/nicolaiarocci/eve/issues/822","id":182881088,"user":{"login":"mcreenan","id":118732,"avatar_url":"https://avatars.githubusercontent.com/u/118732?v=3","gravatar_id":"","url":"https://api.github.com/users/mcreenan","html_url":"https://github.com/mcreenan","followers_url":"https://api.github.com/users/mcreenan/followers","following_url":"https://api.github.com/users/mcreenan/following{/other_user}","gists_url":"https://api.github.com/users/mcreenan/gists{/gist_id}","starred_url":"https://api.github.com/users/mcreenan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcreenan/subscriptions","organizations_url":"https://api.github.com/users/mcreenan/orgs","repos_url":"https://api.github.com/users/mcreenan/repos","events_url":"https://api.github.com/users/mcreenan/events{/privacy}","received_events_url":"https://api.github.com/users/mcreenan/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T14:13:47Z","updated_at":"2016-02-11T14:13:47Z","body":"Ah ok.  Is there a recommended or known way to capture any 500 errors and modify them before they are sent back (similar to how we can with hooks)?"}}