cancel
Showing results for 
Search instead for 
Did you mean: 

Error when connect to the destination and send payload to CPI

TamiKo
Explorer
0 Kudos

I have a CAP project - "library" . This application are deployed in BTP Trial sub-account . I created a destination service and a service key , to maintain "CPIDestination" destination ( using OAuth2ClientCredentials , pointing to CPI endpoint address ) and bound it to library-srv application. But there seems to be some bug or issue in my implementation failing it to work.

When I call CPI flow via POSTMAN it works (http 201)

Error from log:

'Failed to load destination. Caused by: Invalid config (missing).'

Configuration destination:

service.js

cpi.js

2023-05-04-cpi.png

cds.requires:

mta.yaml

How can I solve this issue or am i missing something?

Many thanks, Tatsiana.

Willem_Pardaens
Product and Topic Expert
Product and Topic Expert
0 Kudos

At first glance your approach should work. Could you upload your mta file to double check the binding between your application and the destination service?

FYI, you can also do local testing if you create a default-env.json file containing the VCAP_SERVICES from your deployed app.

TamiKo
Explorer
0 Kudos

Thanks a lot! Running the app locally helped me figure out the error: There was no binding to an XSUAA service instance.

View Entire Topic
TamiKo
Explorer
0 Kudos

Running the application locally helped me figure out the error: there was no binding to the XSUAA service instance.