on 12-28-2021 11:11 AM
Hi,
I have created a CAP multitenant application on BTP. I am using the portal service to setup the Fiori launchpad. I have a provider subaccount where my services and app router is deployed and a consumer subaccount from where I have subscribed my application. After subscribing from the consumer account when I try to access the application using the returned tenant URL then I get Internal Server error. I am not sure what went wrong here and how to figure it out.
I see these errors in the approuter logs:
"msg":"GET request to /cp.portal/site completed with status 500 401 - {\"error\":\"unauthorized\",\"error_description\":\"Bad credentials\"}"}
"msg":"query does not exist for request url /cp.portal/site"}
Hi,
2 things I found to be helpful were:
1. Don't forget to attach your portal service instance also to your server application.
modules:
# SERVER
- name: myserver
...
requires:
...
- name: my-portal
2. Make sure your getDependencies function returns the attached portal service as well.
// server.js
...
// getDependencies function implementation
srv.on('dependencies', async (req, next) => {
let dependencies = await next();
const services = xsenv.getServices({
...
portal: {tag: 'portal'}
});
dependencies = Array.isArray(dependencies) ? dependencies : [dependencies];
...
dependencies.push({xsappname: services.portal.uaa.xsappname});
});
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.