Handling Failed to load resource errors - javascript

I am working in a c# mvc3 application in which requirement is to log all errors,i have managed to used Application_Error event on server and window.onerror event on client side for logging most of errors.
But when any content failed to load(Like image not found on server(Failed to load resource: the server responded with a status of 404 (Not Found) htt//examplehost/Content/Images/notexistingimage.png))
then none of above event fires.
How can I know when these errors occurs so that i may log them?

Related

Wordpress File Upload Error: Failed to load resource: the server responded with a status of 404 (Not Found) worpress

I installed a membership plugin named ARMember to my WordPress website. But it's file uploading filed is not working. When I try to upload a file, it fails and google console shows this error message.
"Failed to load resource: the server responded with a status of 404 (Not Found)"
you may check it here.
BlueMoonGems
Can someone please tell me how to fix this error..?
Thank you!
this is a problem that you need to contact the plugin creators about, this is not the place to look for a solution to such issue. However, you'll probably using an old version ( possible, but not sure ), the plugin is using wrong URL format to make ajax requests, which causes the error.

failed to load resource 499 error

User is not able to select T&C checkbox after scrolling down through agreement file. This issue is happening only on one system, which have kaspersky antivirus but it is turned off.
It is throwing following error in console:
failed to load resource: the server responded with a status of 499 (request has been forbidden by antivirus) notifier.js
failed to load resource the server responded with a status of 499 () stats.g.doubleclick.....
Not sure what is causing this error and not enabling the checkbox.
Anyone have any idea about this? Thanks in advance.

User feedback on Sentry Report Dialog not submitting

I am running a Django server, along with a self-hosted Sentry server. I tried adding a call on my 500.html template to collect user feedback.
The sentry server correctly receives the initial 500 error, but does not receive the user feedback. I see in my javascript console a 404 error after clicking "Submit Crash Report" when trying to send a POST to django.mydomain.com/api/embed/error-page/?eventId=abcde...&dsn=%2F%2Fzxy...%40sentry.mydomain.com%2F2
Before this, there is a successful GET request to sentry.mydomain.com/api/embed/error-page/?eventId=....
Here is the trace of the error:
POST "http://django.mydomain.com/api/embed/error-page/?eventId=b96e57dcb… 404 (Not Found)
dsn=%2F%2F8d64f9e...%40sentry.mydomain.com%2F2".
(anonymous function) # raven.js:703
SentryErrorEmbed.submit # ?eventId=b96e57d…&dsn=%2F%2F8d64f9e…%40sentry.mydoma…:139
_submitBtn.onclick # ?eventId=b96e57d…&dsn=%2F%2F8d64f9e…%40sentry.mydoma…:65
Is it trying to send to the wrong domain? How do I fix this or further investigate?
I was using Sentry 8.0.5, and I upgraded to 8.5.1. This resolved my issue.

PhantomJS Hangs on Page Errors

I am using PhantomJS 2 and the latest CasperJS to test a remote webpage containing some TypeErrors. While logging into the webapp, a popup.created and popup.loaded event are initiated before PhantomJS prints a stacktrace of TypeErrors found when attempting to render the resource. PhantomJS hangs here because PhantomJS does not know how to handle parse errors (Github issue #10687). And my attempts to listen for "error" and "page.error" in both Phantomjs and Casperjs events fail since these TypeError (parse errors) do not throw page.error events (Github issue #10537). I do not own the remote webapp, so I cannot fix these errors. But I need to catch these remote webpage errors and proceed with my testing.
I have unsuccessfully tried to abort loading the resource when the popup.created and popup.loaded events are initiated and I also unsuccessfully attempted to abort the request for the resource when the url of the requested resource matched known url of the .html popup file with TypeErrors. Does anyone know a better way to handle these TypeErrors?

JS Files/Libraries Return HTTP 500 on iOS

I am running my web application on PC devices without any problems (no 404 or 500), however when I run it on iOS (and log it using Safari's Web Inspector) I am seeing that I am getting a couple of HTTP 500 for some JS/Jquery libraries:
[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (jquery.min.map, line 0)
The functionality from some of the files are still available, whereas some are not running. Please note that the location I am getting the 500 for libraries is:
http://myserverip/path/to/currentpage/jquery.min.map
which is not where I store my files. I reference them like:
<script type="text/javascript" src="/static/bower_components/jquery/dist/jquery.min.js"></script>
error 500 is a server error. please check your web service again as this is not a problem from your client.
errors 5XX are server related.
please check if the parameters you send to the server is well formed and without error.

Categories