cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Communication error:401 error in sap cap application on CF

parthasaradhi
Explorer
0 Kudos

Hi Experts,

I have developed and deployed a CAP application with List report Application (Fiori Elements) in it. I have an edit scenario (single record) in the list report.

Now when I try to Edit a record and if I keep screen idle for a few min (<5 min), I am getting the following error:

Can anyone suggest me how to resolve this error.

This error is not happening all the time, but intermittently it occurs.

Do I need to maintain any configs in the application?

Pls do suggest a way to handle this.

With Regards,

Partha

gregorw
Active Contributor
0 Kudos

Have you tried if the sample app cap-sflight works when you deploy it in this subaccount?

parthasaradhi
Explorer
0 Kudos

Hi Gregor,

I haven't deployed the cap-sflight app to the subaccount.

But just to know, is there any solution in this cap-sflight app for the mentioned issue . If yes, do let me know so that I can have the same implemenetd in my application.

With Regards,

Partha.

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi parthasaradhi,

The only way to find out what is really causing the error is to reproduce the error and compare normal http request with the ones when it is failing.

As a best practice while troubleshooting JavaScript based front-end applications such as the ones you code on SAPUI5 is to take a look at the requests on the 'network' tab. Usually you will look for errors like 401 on the list of http requests and try to make sense of what the app is trying to do versus what is not happening.

For instance: find the request that resulted in error 401 and look at request query, header variables, cookies, etc. Try to reproduce the same payload the app is producing on the log outside the browser - I prefer using Postman, but you could certainly use other tools like curl to emulate the same payload.

Maybe you are not getting an error on a batch request, but that request is failing due to invalid credentials due to an expired security token.

Hope this helps.

Best regards,
Ivan