throw on request error

will improve in the future
This commit is contained in:
Radek Stepan 2013-07-16 20:33:42 +01:00
parent 3ca474502a
commit 236e91abb2
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,8 @@ Issues =
response.on "data", (chunk) -> json += chunk
response.on "end", -> callback JSON.parse(json), type
else
throw response.statusCode
).end()
# URLs to API.