Failed to load resource: the server responded with a status of 404 (Not Found) Vue.js - node.js

I am trying to display a series of articles from a Google Alerts RSS Feed on my Vue.js application. My back end is Express.js.
Is my back end correct or do adjustments have to be made? If not, do I need a certain script in my index.html or something like "Vue.use(socket.io) " in my main.js?
This is my code.
I receive these errors when I run my application:
Error in my console

Related

www.server.com/*.aspx returns server error rather than custom error

I have updated my customerr folder to have a common error page which will be displayed for any sort of error.
www.server.com/wrongone
takes to me to the custom error page. -> Working fine
www.server.com/correctone/wrongone.aspx -> This is handled at application level, so I have no problem with this.
But when I hit www.server.com/wrongone.aspx,
It displays Server error. -> I dont want to display server error
What should I do ( at IIS Level) to redirect this to custom error page?
It depend on what status did you get. To set custom error page for .aspx file, you should set .NET error page <customError> instead of error page.
You could find it in IIS manager->site node->.NET error page and you need to add rule for your status code/error page. When you hit the error status code, the page will be redirected to your custom error page. If your status code is 500, then custom page would fail in some case.
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh831398(v%3Dws.11)

Requesting API leads to success on browser but status code 500 in node-red

I'm trying to call an API with "http request" node in node-red (node.js).
After setting an enviroment variable "HTTP_PROXY=http://******", I could call Web pages (such as "http: //google.com") with a response of status code 200, but failed to call the API with status code 500 in node-red.
I could call the API by entering URL directly on browser (Internet Explorer).
How can I solve the problem and call the API in node-red(node.js)? (what's the difference between the two means (node-red and browser))?
You have verified that the API is expecting certain headers, and throws an exception without them (ouch, bad practice!).
Anyway, to invoke the API with additional headers, you can use a change node to add them to the msg object, right before invoking the http request node:

Showing a notice when site fails to load completely

Sometimes during overload some sites fail to load.
I can detect this error using chrome.webRequest.onErrorOccurred api.
I guess the content script will not run at all in this case so sending message from background page to content script is of no use.
How can I paste a notice in the site body that it has failed to load?
Maybe using script execute from the background page? Will the page have a body content?
You've got a few options here. If you're using chrome.webRequest.onErrorOccurred() though I'd suggest you redirect the tab to an error page when an error occurs, using chrome.tabs.update().
For example:
chrome.webRequest.onErrorOccurred.addListener(function(details)
{
chrome.tabs.update(details.tabId, {url: "URL FOR AN ERROR PAGE"});
},
{types: ["main_frame"]});
This will redirect the tab the error occurred in when a web request with a resourceType of main_frame errors.
There are a few things you need to consider here. Do you only want to capture errors from requests with a type of main_frame? If not, just remove the 'types' filter from the event.
The other thing you need to consider is what page you're redirecting to. You can package a HTML file within your extension and then redirect to that. To generate the URL of your error page you can run chrome.extension.getURL('customerrorpage.html').

HTTP Error 405.0 - Method Not Allowed while Form Post

I posted a request to payu server via form submit using angularjs now once payment is completed payu will return a response with hash.But when it hits my success page i get "HTTP Error 405.0 - Method Not Allowed".I found many solutions online but none of that solved my issue.What i understood is that static html do not allow post by default.But my staticFile in IIS is like below
Request Path : *
Module : StaticFileModule
Name : staticFile
Request Restriction >Verb > All Verbs & Access > Script & Invoke > Files and folders
My question now in how to allow POST method for html page.I am using angular and if i change my success url to other than mine it works fine.I think there is some changes to be made to the web config but i tried my best but failed.Any help would be much appreciated.Also lets assume that the page successfully redirects to my success page how to capture the response that payu sends me online.
Thanks in advance if more input is needed from my side kindly ask in reply.
It's not that HTML does not allow POST by default, it's that HTML does not handle POST, period. (Not even if the HTML file contains JavaScript.) POST sends data to a script that runs on your server, and the script has to be smart enough to know what to do with the data. HTML isn't that smart. The only thing your server can do with HTML is to send the HTML back to whatever is requesting it. You need a server-side script that knows how to parse payu's response, do something appropriate with the hash, and then generate some HTML to display in the user's browser.

Playing a raw audio file on a git hub pages project

So, I just deployed a project on github pages. It includes audio files that it is not picking up. I tried to get them with a raw link like so:
(audio id="playAstring")
(source src="https://raw.githubusercontent.com/TJacks89/Tune-Planet/gh-pages/sounds/Astandard.m4a" type="audio/mp4")
(/audio)
and it is giving me this error message:
"Failed to load resource: the server responded with a status of 404 (Not Found)"
Any ideas?

Resources