Check if file exists but prevent 404 error in console from showing up
Seems like the answer is: No. Can't avoid getting a 404 error in the console unless you kick off a call to a server-side script to check file existence.
Check if file exists but prevent 404 error in console from showing up
Seems like the answer is: No. Can't avoid getting a 404 error in the console unless you kick off a call to a server-side script to check file existence.
Angular2: 404 exception handling
The error line is produced by the browser. There is nothing you can do about it.
As workaround you could create an API on the server that doesn't respond with 404
(or any other error code) when requested file doesn't exist, and then handle the alternative error response in Angular code.
Prevent image load errors going to the javascript console
Sorry there is seemingly no way to suppress that error, at least in Google Chrome.
See also: Check if file exists but prevent 404 error in console from showing up
Angular suppress 404 in console when using fallback?
Pankaj Pakar pretty much answered it, after much googling it seems that this is not possible currently. Closing.
Related Topics
Domnodeinserted Equivalent in Ie
Keep Bootstrap Dropdown Open When Clicked Off
How to Initialize a JavaScript Date to Midnight
Convert Unix Timestamp to Date Time (Javascript)
How to Check If an Embedded Svg Document Is Loaded in an HTML Page
How to Create a Date Object from String in JavaScript
Wait Till a Function with Animations Is Finished Until Running Another Function
How to Set the Style -Webkit-Transform Dynamically Using JavaScript
JavaScript Es6 Typeerror: Class Constructor Client Cannot Be Invoked Without 'New'
Read a Text File Using Node.Js
How to Concatenate Regex Literals in JavaScript
How to Show Current Time in JavaScript in the Format Hh:Mm:Ss
How to Deeply Merge Two Object Values by Keys
How to Update a Specific Index from the Array in Firestore