Dear experts,
I have created a simple application using SAP Web IDE FullStack.
In the onInit function of my controller, I am trying to access an external endpoint. My destination is the following:

My neo-app.json looks like this:
{
"welcomeFile": "/webapp/index.html",
"routes": [
{
"path": "/resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/resources"
},
"description": "SAPUI5 Resources"
},
{
"path": "/test-resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/test-resources"
},
"description": "SAPUI5 Test Resources"
}, {
"path": "/joke",
"target": {
"type": "destination",
"name": "joke",
"entryPath": "/"
},
"description": ""
}
],
"sendWelcomeFileRedirect": true
}
controller.js onInit function:
var jokesModel = new JSONModel();
fetch("/joke/jokes/random/15").then(function(data){
return data.json();
}).then(function(data){
jokesModel.setData(data.value);
}).catch(function(err){
MessageToast.show("Something went wrong... " + err);
});
Placing a debugger in the first resolved method shows that my response data is completely wrong:
HTTP 503 - Service Unavailable.

However, if I provide a hard coded URL to the fetch function the GET request will be successful, and then I am able to parse the body and store it without any problem.

Unfortunately I have no idea what causes this error, so any help is appreciated.