{"action":"created","issue":{"url":"https://api.github.com/repos/timothycrosley/hug/issues/156","labels_url":"https://api.github.com/repos/timothycrosley/hug/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/timothycrosley/hug/issues/156/comments","events_url":"https://api.github.com/repos/timothycrosley/hug/issues/156/events","html_url":"https://github.com/timothycrosley/hug/issues/156","id":130251525,"number":156,"title":"Use of output formatter seems to affect required parameters","user":{"login":"horvathcom","id":1622462,"avatar_url":"https://avatars.githubusercontent.com/u/1622462?v=3","gravatar_id":"","url":"https://api.github.com/users/horvathcom","html_url":"https://github.com/horvathcom","followers_url":"https://api.github.com/users/horvathcom/followers","following_url":"https://api.github.com/users/horvathcom/following{/other_user}","gists_url":"https://api.github.com/users/horvathcom/gists{/gist_id}","starred_url":"https://api.github.com/users/horvathcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horvathcom/subscriptions","organizations_url":"https://api.github.com/users/horvathcom/orgs","repos_url":"https://api.github.com/users/horvathcom/repos","events_url":"https://api.github.com/users/horvathcom/events{/privacy}","received_events_url":"https://api.github.com/users/horvathcom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/timothycrosley/hug/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-01T04:15:15Z","updated_at":"2016-02-01T05:29:51Z","closed_at":null,"body":"I don't know why the presence of an output formatter would affect making sure required parameters are present...\r\n\r\n```\r\n    \r\n'''\r\nBoth of these have a single parameter named \"data\".\r\nIf you call the one without the output formatter, it correctly notices the missing parameter.\r\nIf you call the one with the output formatter, it raises a server error.\r\n\r\n'''\r\nimport hug\r\n\r\n@hug.get('/without_output_formatter')\r\ndef with_output_formatter(data):\r\n    ''' \r\n    If called without the required parameter, gives you ...\r\nHTTP/1.0 400 Bad Request\r\nDate: Mon, 01 Feb 2016 04:09:15 GMT\r\nServer: WSGIServer/0.2 CPython/3.4.3+\r\ncontent-length: 55\r\ncontent-type: application/json\r\n\r\n{\r\n    \"errors\": {\r\n        \"data\": \"Required parameter not supplied\"\r\n    }\r\n}\r\n\r\n    '''\r\n    return 'Without Output Formatter'\r\n\r\n@hug.get('/with_output_formatter',output=hug.output_format.svg_xml_image)\r\ndef without_output_formatter(data):\r\n    ''' \r\n    If called without the required parameter, gives you ...\r\nHTTP/1.0 500 Internal Server Error\r\nContent-Length: 59\r\nContent-Type: text/plain\r\nDate: Mon, 01 Feb 2016 04:09:09 GMT\r\nServer: WSGIServer/0.2 CPython/3.4.3+\r\n\r\nA server error occurred.  Please contact the administrator.\r\n\r\n    \r\n    ''' \r\n    return 'With Output Formatter'\r\n\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/timothycrosley/hug/issues/comments/177774488","html_url":"https://github.com/timothycrosley/hug/issues/156#issuecomment-177774488","issue_url":"https://api.github.com/repos/timothycrosley/hug/issues/156","id":177774488,"user":{"login":"timothycrosley","id":2090154,"avatar_url":"https://avatars.githubusercontent.com/u/2090154?v=3","gravatar_id":"","url":"https://api.github.com/users/timothycrosley","html_url":"https://github.com/timothycrosley","followers_url":"https://api.github.com/users/timothycrosley/followers","following_url":"https://api.github.com/users/timothycrosley/following{/other_user}","gists_url":"https://api.github.com/users/timothycrosley/gists{/gist_id}","starred_url":"https://api.github.com/users/timothycrosley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothycrosley/subscriptions","organizations_url":"https://api.github.com/users/timothycrosley/orgs","repos_url":"https://api.github.com/users/timothycrosley/repos","events_url":"https://api.github.com/users/timothycrosley/events{/privacy}","received_events_url":"https://api.github.com/users/timothycrosley/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T05:29:51Z","updated_at":"2016-02-01T05:29:51Z","body":"Also: FYI if your using develop branch - Options #1, and #3 are already implemented in the and I've opened an issue for #2 https://github.com/timothycrosley/hug/issues/157"}}