{"action":"created","issue":{"url":"https://api.github.com/repos/dingo/api/issues/612","labels_url":"https://api.github.com/repos/dingo/api/issues/612/labels{/name}","comments_url":"https://api.github.com/repos/dingo/api/issues/612/comments","events_url":"https://api.github.com/repos/dingo/api/issues/612/events","html_url":"https://github.com/dingo/api/issues/612","id":103602037,"number":612,"title":"Do not run middleware if exception is thrown","user":{"login":"Zyles","id":1741593,"avatar_url":"https://avatars.githubusercontent.com/u/1741593?v=3","gravatar_id":"","url":"https://api.github.com/users/Zyles","html_url":"https://github.com/Zyles","followers_url":"https://api.github.com/users/Zyles/followers","following_url":"https://api.github.com/users/Zyles/following{/other_user}","gists_url":"https://api.github.com/users/Zyles/gists{/gist_id}","starred_url":"https://api.github.com/users/Zyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zyles/subscriptions","organizations_url":"https://api.github.com/users/Zyles/orgs","repos_url":"https://api.github.com/users/Zyles/repos","events_url":"https://api.github.com/users/Zyles/events{/privacy}","received_events_url":"https://api.github.com/users/Zyles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-27T21:45:40Z","updated_at":"2015-08-31T12:01:01Z","closed_at":null,"body":"Hi, me again...\r\n\r\nI have a really simple middleware which runs on every request and adds a key value to the JSON response. But I do not want to run it if there is an exception thrown and dingo shows the error message.\r\n\r\nRight now dingo generates the error message, then my middleware runs and adds my custom value after.\r\n\r\nIs it possible to tell it somehow not to run middleware if exception is thrown? Or at least run middleware, but detect if exception is thrown so I can use an if statement and ommit the middleware code."},"comment":{"url":"https://api.github.com/repos/dingo/api/issues/comments/136350976","html_url":"https://github.com/dingo/api/issues/612#issuecomment-136350976","issue_url":"https://api.github.com/repos/dingo/api/issues/612","id":136350976,"user":{"login":"jasonlewis","id":829059,"avatar_url":"https://avatars.githubusercontent.com/u/829059?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonlewis","html_url":"https://github.com/jasonlewis","followers_url":"https://api.github.com/users/jasonlewis/followers","following_url":"https://api.github.com/users/jasonlewis/following{/other_user}","gists_url":"https://api.github.com/users/jasonlewis/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonlewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonlewis/subscriptions","organizations_url":"https://api.github.com/users/jasonlewis/orgs","repos_url":"https://api.github.com/users/jasonlewis/repos","events_url":"https://api.github.com/users/jasonlewis/events{/privacy}","received_events_url":"https://api.github.com/users/jasonlewis/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T12:01:01Z","updated_at":"2015-08-31T12:01:01Z","body":"I'll take a look when I can. This might be how Lumen does it."}}