When I validate on my backend it returns a 400. So I make a request like:
this.get('ajax').request('api/foo/', {
contentType: 'application/json; charset=utf-8',
method: 'POST',
data: JSON.stringify(data)
});
The problem is that ember-ajax will raise an exception from inside a promise. How can I deal with that? The 400 is intentional behavior, not an exception, I don't want to see it in my console and it seems to be braking other parts of my app.
Aucun commentaire:
Enregistrer un commentaire