I try to catch error 400 bad request
like this:
catch((error: any) => {
if (error.status === 500) {
return Observable.throw(new Error(error.status));
}
else if (error.status === 400) {
console.log( 'error' );
return Observable.throw(new Error(error.status));
}
but it still appears like this in the console:
Do you have any idea how to fix this problem or remove this message on console?
Thanks a lot.
This is the browser's standard behavior and cannot be influenced by you or Angular.
If you get those messages a lot and it clutters your console whilst developing, you can filter the console. This is how you would do it in Chrome: