cancel
Showing results for 
Search instead for 
Did you mean: 

401 Unauthorized error - CLD200 - perfroming a manual deployment Excercise

govindturka
Product and Topic Expert
Product and Topic Expert
0 Kudos

 am doing this exercise and I am able to do it all the way except last step where I click on business partner and I am supposed to see the business partner data from API hub sandbox environment. I am getting 401- unauthorized error. Then I recreated the whole exercise but no success. I can see my applications with route url in my BTP account and cf push also is success with instance running. I can stop , restart the application from CLI and from BTP account. I then checked my destination service connection and it gives me same authorization error that connection established but unauthorized response. When I test the service in API hub , the response comes back 200 OK and I can see the response so API is working fine there. I read some blogs and tried to pass API key different ways(other than mentioned in exercise, i verified as well with cf env risk-management-srv) and I tried some commands told in those blogs but no success. Can anyone please help? Can anyone give package.json code as well as it seems the excercise screenshots have some extra code but not sure.

Step n: Open the browser tab with the running service. The BusinessPartners endpoint should now provide the data from the external service, the SAP API Business Hub sandbox environment.Try to open the other service endpoints. The corresponding data should appear. Just now, it is not stored in an SQLite database, but in your SAP HANA Cloud trial HDI Container. SAP BTP, Cloud Foundry runtime and environment @markushaug unauthorized.JPGdestination unauthorized.JPG

markushaug
Product and Topic Expert
Product and Topic Expert

Hi, would you please provide a Git Repository for your project? This makes it easier for us to investigate on it.
You can follow these steps to create and connect your project in the SAP Business Application Studio to a GitHub Repository:

https://learning.sap.com/learning-journey/developing-with-sap-extension-suite/creating-and-connectin...

govindturka
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @markushaug , thanks for sharing steps. This part of creating and connecting to GIT is later in the content so I did not know it. but here it is now https://github.com/govindturka/RiskManagement . looking forward to solve this.

tomjohn_br
Explorer
0 Kudos
Hi, Did you already solve this issue? I am also facing the same error...
View Entire Topic
markushaug
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jeff,

thanks for reaching out to us.

Could you please share your project via git?

 

BR,

Markus

Jeff_G
Associate
Associate
0 Kudos
Hi, After taking advice from others to try to get it to deploy with now errors, now the app is not even working in the BAS. Unless someone can look at this and help me figure out what is wrong with it, I feel like I may need to start the app over from scratch.
Jeff_G
Associate
Associate
0 Kudos
Hi Markus, Is there a way I can import the app from git at a state that is ready to be deployed to CF, successfully without errors? Then I can continue the exercises in the journey. Thanks, Jeff
markushaug
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi, yes you can switch to the respective solution git branch. Here's an overview of all branches: https://github.com/SAP-samples/btp-side-by-side-extension-learning-journey/branches/active?query=sol...
markushaug
Product and Topic Expert
Product and Topic Expert
0 Kudos
In the SAP Business Application Studio/VS Code you can switch the branch in the bottom left corner. Per default you should see "main" there. If you click on it, all branches will appear in a popup. Then choose the corresponding solution branch. Otherwise, you can also switch the branch via the git CLI.
Jeff_G
Associate
Associate
0 Kudos

I have started the journey all over from scratch. Now I am able to deploy the app on CF with no error, but when I try to test I get a "redirect" error:

Jeff_G_0-1675461700774.png

Is this correct in the .yaml file: 

Jeff_G_1-1675461843282.png

I also tried it with the blue line in the box above commented out and the last line uncommented.   That gave a "redirect" error also.  

Any ideas?  

Thanks, 

Jeff

 

markushaug
Product and Topic Expert
Product and Topic Expert
Could you please run "cf apps" and "cf routes" in your terminal to see the exact routes of your approuter instance?
Jeff_G
Associate
Associate
I was able to set the correct "redirect" url now. Thanks
0 Kudos
Hi Jeff_G, I have the same error how did you set the correct url?