Skip to content
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

401 Unauthorized thowing Uncaught TypeError #2694

Closed
arenoir opened this issue Jan 13, 2015 · 8 comments
Closed

401 Unauthorized thowing Uncaught TypeError #2694

arenoir opened this issue Jan 13, 2015 · 8 comments

Comments

@arenoir
Copy link
Contributor

arenoir commented Jan 13, 2015

I am getting the following error whenever the backend returns a 401 Unauthorized code.

Uncaught TypeError: Cannot assign to read only property '__reason_with_error_thrown__' of Unauthorized

I don't know if this is an ember-data, ember, or RSVP issue.

Ember : 1.10.0-beta.4
Ember Data : 1.0.0-beta.15-canary

screen shot 2015-01-13 at 1 00 54 pm

@bmac
Copy link
Member

bmac commented Jan 13, 2015

@arenoir I attempted to put together a quick jsbin to test this and I was unable to reproduce this TypeError. Could you take a look at this jsbin and let me know if I'm missing something? http://emberjs.jsbin.com/lefavenoqu/1/edit?html,js,console

@wecc
Copy link
Contributor

wecc commented Jan 13, 2015

Probably related: #2638 (comment)

@arenoir
Copy link
Contributor Author

arenoir commented Jan 13, 2015

@bmac thanks for putting that jsbin together. I can't reproduce it either. Perhaps it is ember simple auth. adding a call back to the ajax method somewhere.

@bmac
Copy link
Member

bmac commented Jan 13, 2015

It looks like @wecc is on to something since his jsbin http://emberjs.jsbin.com/cicejusaja reproduces the error that you described.

@stefanpenner do you have any insight into the magic of __reason_with_error_thrown__?

@rwjblue
Copy link
Member

rwjblue commented Jan 13, 2015

@bmac
Copy link
Member

bmac commented Jan 13, 2015

Digging into it a little more and it looks the the TypeError only occurs when errorThrown is a string instead of an Error object.

@arenoir
Copy link
Contributor Author

arenoir commented Jan 14, 2015

@bmac that was it, I pulled in the latest build and all is good. 🍻

@arenoir arenoir closed this as completed Jan 14, 2015
@bmac
Copy link
Member

bmac commented Jan 14, 2015

Awesome. Thanks for the bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants