Comments (6)
Thanks for the bug report. There's definitely some inconsistency in our implementation and the comment in this adapter.
I looked at the active model adapter and it also returns the jqXHR instead of the an Error in this case (Error(jsonErrors['detail']);
).
I chose to parse the error that Django Rest Framework provides because I thought it would be more useful than returning the jqHXR. I'm definitely open to changing this but I just want to understand how this is normally used in Ember applications. Can you provide an example of something that you can't do with the current implementation? Or an example that shows the returning the jqXHR is better? Thanks.
from ember-django-adapter.
Can you provide an example of something that you can't do with the current implementation?
For startes I can't do what guide tells me I should be able to do:
http://emberjs.com/guides/routing/loading-and-error-substates/
Resources on ember.js forums show me that I should be able to do so:
http://discuss.emberjs.com/t/how-to-deal-with-route-when-model-gets-a-404/5283/2
I want to look into error within my ApplicationRouter error handler and thus make call between error404 page that will have search field, common links and suggestions about why user can't reach page, and error 403 that will actually display error message from server. There is also special kind of error 403 that happens when user is banned. In this case ban details are added to error JSON and I can notice that within 403 handling and render errror-banned template that will display this JSON.
Finally there is also special 0 status code which I would love to redirect to error 0 page explaining user that server connection has been lost.
from ember-django-adapter.
Ok, I'll fix this. Thanks for the information.
from ember-django-adapter.
👍 good man, thanks for working on this!
from ember-django-adapter.
@rafalp Can you review the code and try out the fix in #62 to see if it's going to work for you? Thanks.
from ember-django-adapter.
Yep, my Ember.js ApplicationRoute's error hook can now access error status and whole message. There's also error.status
so 👍
from ember-django-adapter.
Related Issues (20)
- What are the advantages/disadvantages of using this package vs django-rest-framework-json-api? HOT 2
- Fastboot - Error: The adapter operation was aborted HOT 3
- upload file
- Why embedded record is not populated with Ember.Model? HOT 2
- An in-range update of loader.js is breaking the build 🚨 HOT 9
- An in-range update of ember-data is breaking the build 🚨 HOT 11
- An in-range update of ember-cli-htmlbars is breaking the build 🚨 HOT 1
- Correctly serialize lists of URLs for nested relationships HOT 3
- An in-range update of ember-disable-prototype-extensions is breaking the build 🚨 HOT 1
- An in-range update of ember-cli-inject-live-reload is breaking the build 🚨 HOT 1
- Upgrade ember-cli
- Dependecy problem with ember-inflector HOT 1
- Update to Ember-Data v3.0 HOT 21
- Acceptance test fails because CRUD operation didn't finish up before app shutdown HOT 4
- Generate adapter and serializer in pods
- CircleCI fails with pip install mkdocs HOT 11
- Easy to get multiple versions of ember-data HOT 1
- Website/Documentation 404 HOT 8
- Import AdapterError and InvalidError from "DS" object HOT 1
- No release with latest commits HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-django-adapter.