1
Ich habe diese Funktion:Axios 400 Fehler Anforderungsruf dann statt Fang
add(App, Params, Callback){
var self = this;
var Data = self.process_fields(Params)
self.$http.post(
paths.api + '/app/' + App.Permalink,
new URLSearchParams(Data)
).then(function (error, response) {
console.log("then");
if (typeof (Callback) == "function") {
Callback(true, response.data.data);
}
}).catch(function(error){
console.log("catch");
if(typeof error.response !== "undefined"){
errors.render(error.response.data.error)
}
if (typeof (Callback) == "function") {
Callback(false, null);
}
});
}
Wenn ich Anfrage anrufen und einen 400-Fehler empfangen, es dann statt Fang ruft: