{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/608","repository_url":"https://api.github.com/repos/serverless/serverless","labels_url":"https://api.github.com/repos/serverless/serverless/issues/608/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/608/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/608/events","html_url":"https://github.com/serverless/serverless/issues/608","id":132913589,"number":608,"title":"Add default error codes","user":{"login":"eahefnawy","id":2312463,"avatar_url":"https://avatars.githubusercontent.com/u/2312463?v=3","gravatar_id":"","url":"https://api.github.com/users/eahefnawy","html_url":"https://github.com/eahefnawy","followers_url":"https://api.github.com/users/eahefnawy/followers","following_url":"https://api.github.com/users/eahefnawy/following{/other_user}","gists_url":"https://api.github.com/users/eahefnawy/gists{/gist_id}","starred_url":"https://api.github.com/users/eahefnawy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eahefnawy/subscriptions","organizations_url":"https://api.github.com/users/eahefnawy/orgs","repos_url":"https://api.github.com/users/eahefnawy/repos","events_url":"https://api.github.com/users/eahefnawy/events{/privacy}","received_events_url":"https://api.github.com/users/eahefnawy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/serverless/serverless/labels/enhancement","name":"enhancement","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"eahefnawy","id":2312463,"avatar_url":"https://avatars.githubusercontent.com/u/2312463?v=3","gravatar_id":"","url":"https://api.github.com/users/eahefnawy","html_url":"https://github.com/eahefnawy","followers_url":"https://api.github.com/users/eahefnawy/followers","following_url":"https://api.github.com/users/eahefnawy/following{/other_user}","gists_url":"https://api.github.com/users/eahefnawy/gists{/gist_id}","starred_url":"https://api.github.com/users/eahefnawy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eahefnawy/subscriptions","organizations_url":"https://api.github.com/users/eahefnawy/orgs","repos_url":"https://api.github.com/users/eahefnawy/repos","events_url":"https://api.github.com/users/eahefnawy/events{/privacy}","received_events_url":"https://api.github.com/users/eahefnawy/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2016-02-11T08:12:28Z","updated_at":"2016-02-19T19:43:18Z","closed_at":null,"body":"Thanks to the awesome @staceymoore, we should now have the following default error codes templates in all projects `s-templates.json` file:\r\n\r\n```\r\n\"responsesForGet\": {\r\n    \".*400.*\": \"$${response400}\",\r\n    \".*Process exited.*\": \"$${response500}\",\r\n    \".*Task timed out.*\": \"$${response504}\",\r\n    \"default\": \"$${response200}\"\r\n  },\r\n  \"responsesForPost\": {\r\n    \".*400.*\": \"$${response400}\",\r\n    \".*Process exited.*\": \"$${response500}\",\r\n    \".*Task timed out.*\": \"$${response504}\",\r\n    \"default\": \"$${response201}\"\r\n  },\r\n  \"response200\": {\r\n    \"statusCode\": \"200\",\r\n    \"responseParameters\": \"$${responseParameters}\",\r\n    \"responseTemplates\": {\r\n      \"application/json\": \"\"\r\n    }\r\n  },\r\n  \"response201\": {\r\n    \"statusCode\": \"201\",\r\n    \"responseParameters\": \"$${responseParameters}\",\r\n    \"responseTemplates\": {\r\n      \"application/json\": \"\"\r\n    }\r\n  },\r\n  \"response400\": {\r\n    \"statusCode\": \"400\",\r\n    \"responseModels\": {},\r\n    \"responseTemplates\": {\r\n      \"application/json\": \"#set($inputRoot = $input.path('$.errorMessage'))$inputRoot\"\r\n    }\r\n  },\r\n  \"response500\": {\r\n    \"statusCode\": \"500\",\r\n    \"responseTemplates\": {\r\n      \"application/json\": \"{\\\"error\\\": \\\"Server Error\\\"}\"\r\n    }\r\n  },\r\n  \"response504\": {\r\n    \"statusCode\": \"504\",\r\n    \"responseTemplates\": {\r\n      \"application/json\": \"{\\\"error\\\": \\\"Gateway Timeout\\\"}\"\r\n    }\r\n  },\r\n  \"responseParameters\": {\r\n    \"method.response.header.location\": \"integration.response.body.links.self\"\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/186373403","html_url":"https://github.com/serverless/serverless/issues/608#issuecomment-186373403","issue_url":"https://api.github.com/repos/serverless/serverless/issues/608","id":186373403,"user":{"login":"erikerikson","id":571200,"avatar_url":"https://avatars.githubusercontent.com/u/571200?v=3","gravatar_id":"","url":"https://api.github.com/users/erikerikson","html_url":"https://github.com/erikerikson","followers_url":"https://api.github.com/users/erikerikson/followers","following_url":"https://api.github.com/users/erikerikson/following{/other_user}","gists_url":"https://api.github.com/users/erikerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/erikerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikerikson/subscriptions","organizations_url":"https://api.github.com/users/erikerikson/orgs","repos_url":"https://api.github.com/users/erikerikson/repos","events_url":"https://api.github.com/users/erikerikson/events{/privacy}","received_events_url":"https://api.github.com/users/erikerikson/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T19:43:18Z","updated_at":"2016-02-19T19:43:18Z","body":"Finally getting around to some testing, I get an error related to the lack of broad template and variable definition reported here: https://github.com/serverless/serverless/issues/681"}}