Week 6 test of Create and Manage APIs is throwing Http 500 Error

remeeshnair
Participant IV

I am trying to submit week 6 exercise for Create and Manage APIs and it is returning me Http 500 error saying "Seems your access_token works, but the joke payload didn't come back with the right ID" .

When i test with console I am getting the below response for Joke proxy providing Bearer token as header with a http 200.

{

"jokeid": "3229",

"title": "Advice for Idiots",

"body": "An actual tip from page 16 of the HP "Environmental,Health & Safety Handbook for Employees": \n\n "Blink your eyelids periodically to lubricate your eyes."",

"rating": "G",

"img": "",

"modified": "2000-07-31",

"comments": [ "this joke is awesome", " This is fun" ]

}

I am using 3229 as the jokeid in the request. Not sure why the test submission tool is throwing this error. Please let me know anyone else is facing similar issue.

Solved Solved
0 5 409
1 ACCEPTED SOLUTION

Not applicable

There seems to be some issue in the Assignment submission portal. Once you provide links and click on "test" button for session 6, in the call to get jokes details portal sends Content-Type header with value "application/json" . This header should not be sent in a GET call ideally. On the proxy side there is a JSON threat protection policy which fails sinze content type is application/json and there is no json request content present. So in order to fix that, call from portal should not send content type header to proxy while testing. As a workaround , in order to get flow working the developer can detach JSON Threat protection policy while testing from assignment submission portal. This will make end to end flow work and test is passed.

View solution in original post

5 REPLIES 5

Not applicable

There seems to be some issue in the Assignment submission portal. Once you provide links and click on "test" button for session 6, in the call to get jokes details portal sends Content-Type header with value "application/json" . This header should not be sent in a GET call ideally. On the proxy side there is a JSON threat protection policy which fails sinze content type is application/json and there is no json request content present. So in order to fix that, call from portal should not send content type header to proxy while testing. As a workaround , in order to get flow working the developer can detach JSON Threat protection policy while testing from assignment submission portal. This will make end to end flow work and test is passed.

remeeshnair
Participant IV

Thanks Manish, let me try that and get back.

Hello Remeesh,

If that doesn't work, send me (mmalloy@apigee.com) the curl commands to get a token and call your joke API. I'll evaluate it manually if you can't get the test program to work for you.

remeeshnair
Participant IV

Excellent !! it worked, thanks a lot Manish. Can APIGEE Tutorial preparation team make a note of it?

Not applicable

Thank you very much Manish. I had to detach JSON Thread protection policy also to succeed the test.