Unable to make call to Campaign API

Avatar

Avatar
Employee
harpreet_ahluwa
Employee

Likes

0 likes

Total Posts

8 posts

Correct reply

0 solutions
View profile

Avatar
Employee
harpreet_ahluwa
Employee

Likes

0 likes

Total Posts

8 posts

Correct reply

0 solutions
View profile
harpreet_ahluwa
Employee

01-07-2020

I have setup a firefly app and build a project using the out of box template. However whenever I make a call to the Campaign's getProfiles api call (out of box ) it shows a server error. There is no other error to debug why this could be happening.

I have also used the project from here https://github.com/AdobeDocs/adobeio-samples-customers-dashboard However the same error when making a call to either getprofiles or send-promo.

Below is the debug stmts when debugging thru VS code

 

GET-PROFILES

 

020-07-01T17:43:01.358544100Z 2020-07-01T17:43:01.355Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_get-profiles] info: Calling the main action
2020-07-01T17:43:01.361061600Z 2020-07-01T17:43:01.360Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_get-profiles] debug: {"LOG_LEVEL":"debug","__ow_headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-US, en;q=0.9","authorization":"<hidden>","connection":"close","content-type":"application/json","host":"controller-a","origin":"https://localhost:9080","perf-br-req-in":"1593625379.689","referer":"https://localhost:9080/?_mr=https%3A%2F%2Fexperience.adobe.com%2Fassets%2Fruntime.0c1c1f0b.js&shell_domain=experience.adobe.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","x-forwarded-for":"67.188.179.10, 10.250.204.31","x-forwarded-host":"260965-campaigndashboard-stage.adobeioruntime.net","x-forwarded-port":"443","x-forwarded-proto":"https","x-gw-ims-org-id":"xxxxxxx@AdobeOrg","x-request-id":"UJY4lMkbcNVHPBc3dgXsC0SfE79kSn8L"},"__ow_method":"post","__ow_path":"","apiKey":"c54465b21e7042a1b43ad4f","body":{"message":"validation success"},"statusCode":200,"tenant":"acs1008.msavlab"}
2020-07-01T17:44:05.970552500Z 2020-07-01T17:44:05.969Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_get-profiles] error: [CampaignStandardSDK:ERROR_GET_ALL_PROFILES] Error: Bad Request
2020-07-01T17:44:05.971044700Z 2020-07-01T17:44:05.970Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_get-profiles] info: 500: server error
2020-07-01T17:44:05.975235300Z XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
2020-07-01T17:44:05.977268700Z XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
Completed activation c43e0523f1b44d34be0523f1b4bd349b in 64.661 sec
{ error: { statusCode: 500, body: { error: 'server error' } } }

 

GET-PROMO

2020-07-01T17:47:58.371923000Z 2020-07-01T17:47:58.371Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_send-promo] debug: {"LOG_LEVEL":"debug","__ow_headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-US, en;q=0.9","authorization":"<hidden>","connection":"close","content-type":"application/json","host":"controller-a","origin":"https://localhost:9080","perf-br-req-in":"1593625678.149","referer":"https://localhost:9080/?_mr=https%3A%2F%2Fexperience.adobe.com%2Fassets%2Fruntime.0c1c1f0b.js&shell_domain=experience.adobe.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","x-forwarded-for":"67.188.179.10, 10.250.204.31","x-forwarded-host":"260965-campaigndashboard-stage.adobeioruntime.net","x-forwarded-port":"443","x-forwarded-proto":"https","x-gw-ims-org-id":"XXXXXXX@AdobeOrg","x-request-id":"Ot8eYCa0okYQqidX7jbtTsI7ew3I9gvk"},"__ow_method":"post","__ow_path":"","apiKey":"c54465b21e7042a1b43ad4f","body":{"message":"validation success"},"email":"test@gmail.com","statusCode":200,"tenant":"acs1008.msavlab","workflowId":"wkf1"}
2020-07-01T17:48:44.347600000Z 2020-07-01T17:48:44.346Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_send-promo] error: [CampaignStandardSDK:ERROR_GET_WORKFLOW] Error: Bad Request
2020-07-01T17:48:44.349630200Z 2020-07-01T17:48:44.346Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_send-promo] info: 500: server error
2020-07-01T17:48:44.349699200Z XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
2020-07-01T17:48:44.350816300Z XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
Completed activation 5fe9be62f3a34beea9be62f3a3fbeef4 in 45.995 sec
{ error: { statusCode: 500, body: { error: 'server error' } } }

 

The tenant of my Campaign instance is acs1008.msavlab, could that be reason for the issue ?

Any help would be appreciated.

Thank you.

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 25
Employee
duypnguyen
Employee

Likes

36 likes

Total Posts

174 posts

Correct reply

32 solutions
Top badges earned
Give Back 25
Boost 25
Applaud 5
Give Back 5
Give Back 3
View profile

Avatar
Give Back 25
Employee
duypnguyen
Employee

Likes

36 likes

Total Posts

174 posts

Correct reply

32 solutions
Top badges earned
Give Back 25
Boost 25
Applaud 5
Give Back 5
Give Back 3
View profile
duypnguyen
Employee

03-07-2020

@harpreet_ahluwa , according to the comment, the error was due to an incorrect tenant ID. You should be able to run the code with a correct tenant.

Please let me know if you have other questions.