-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError on empty response from HTTP request #71
Comments
Does this error also occur, when you use |
Same problem, I've tried the following: userService.findMe() onSuccess {
case data => js.Dynamic.global.console.log(data)
}
userService.findMe() onFailure {
case ex => js.Dynamic.global.console.error(s"An error has occurred: $ex")
} This creates the same error message:
|
Could you please check what happens if you use the bare bone Angular method |
Yeah, the following code works just like it should: userService.findMe().success((data: String, status: Int) =>
js.Dynamic.global.console.log(data)
)
userService.findMe().error((data: String, status: Int) =>
js.Dynamic.global.console.error(data)
) |
Thanks; I have to check the macro code, but that will take some time (I'm currently preoccupied with other stuff)... |
Of course, I can just use the plain angular promise methods for now. Let me know if you need any more debugging from my end later on. |
@offerijns I think I've solved the issue in the current 0.2.2-SNAPSHOT; could you please verify? |
@jokade yes it's fixed, thanks a lot! |
I've got the following
Service
for retrieving some data from our API:And I'm calling this using the following code:
Now, when
/users/me
returns a 200 OK with the correct data, it works perfectly. However, when it returns either a404
or405
without any response data, the following error occurs instead of triggering theFailure
case:App.scala:54
returns to the onComplete method in the 2nd code block. This seems somewhat similar to #22, yet I'm using the latest version (0.2.2-SNAPSHOT
), so it should already be fixed. Any thoughts on what's going on here?The text was updated successfully, but these errors were encountered: