cancel
Showing results for 
Search instead for 
Did you mean: 

Service instance crash due to application unexpected errors

former_member814151
Discoverer
0 Kudos
781

Hi Expert,

I created an application with SAP CAP(Cloud Application Programing) in the SAP BTP Cloud Foundry environment. When the invalid parameters are passed to API, the application will generate a run-time error, which causes the service instance to crash. I can update the application to capture the errors that happened. But is there any way to prevent the instance crash even if the app has a run-time error? This is a multi-tenant app, one consumer's incorrect operation should not impact other consumers. Any thoughts or suggestions are greatly appreciated!

Nodejs version: 14.17.6

CDS version: 5.4.5

sidecar-srv-error-log-2022-07-07-21-02-182070000.txt

gregorw
Active Contributor
0 Kudos

If possible make sure that you upgrade to the latest CDS v5 (5.9.8) and plan to upgrade to v6.

Accepted Solutions (0)

Answers (1)

Answers (1)

vitaly_kozyura
Advisor
Advisor
0 Kudos

Hi Jim,

You should capture the error in your custom handler. The runtime behavior follows the "Let it crash" pattern: https://cap.cloud.sap/docs/node.js/best-practices#error-handling

Best regards,

Vitaly