Mark_Mathis | 2017-12-05 17:41:09 UTC | #1
I have created an integration custom action. When I test the call I receive the following error. I can make the call in a browser without issue (copied requestUrlTemplate, pasted in browser and changed the ${input.ContractId} a valid value.)
Please let me know what my next step to troubleshooting should be Error Returned:
{ "status": 500, "code": "internal.server.error", "message": "The server encountered an unexpected condition which prevented it from fulfilling the request.", "messageParams": {}, "contextId": "bafbacb3-b989-4f12-8a5b-ceabfece3245", "details": [], "errors": [ { "status": 200, "code": "INTERNALSERVERERROR", "message": "REST call for action execute failed. Message:Response was reported as success. However, we were unable to process response. [bafbacb3-b989-4f12-8a5b-ceabfece3245] [bafbacb3-b989-4f12-8a5b-ceabfece3245]", "messageParams": {}, "details": [], "errors": [] } ] }
Everything validates, and I don't know how to troubleshoot this.
Here is the Input and output contracts: Input Contract:
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Validate and return contract information", "description": "Items needed in the input of the GET to return contract info after validating contract number and last 4 digits of SSN.", "type": "object", "required": [ "ContractId" ], "properties": { "ContractId": { "type": "string", "description": "Contract number collected from caller." } } }
Output Contract:
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Validate and return contract information", "description": "This is the contract that will be enforced. See the success template for how this is produced. Returns the full response.", "type": "object", "properties": { "ContractId": { "description": "Contract Number returned from PARIS. If empty, contract number is invalid.", "type": "string", "default": "" }, "AccessCode": { "description": "4 digit Access code for validation.", "type": "string", "default": "" }, "StatusCode": { "description": "Status Code, should be D00, D01, D02, or D55", "type": "string", "default": "" }, "StatusMessage": { "description": "Status Message associated with Status Code", "type": "string", "default": "" }, "PlanNumber": { "description": "Plan Number", "type": "string", "default": "" }, "PIN": { "type": "string", "description": "Encrypted PIN", "default": "" }, "FundSymbols": { "description": "Linked Array of 3 char fund symbols (string)", "type": "array", "items": { "type": "string" } }, "FundUnitValues": { "description": "Linked Array of fund unit values (string)", "type": "array", "items": { "type": "string", "title": "The 0 Schema." } }, "FundNumberOfUnits": { "description": "Linked Array of number of units owned for associated fund (string)", "type": "array", "items": { "type": "string" } }, "FundAllocationPercentages": { "description": "Linked Array of percent allocated for associated fund (ie: 0.100 would be 10 percent)", "type": "array", "items": { "type": "string" } }, "FundBalances": { "description": "Linked Array of balance for associated fund (string)", "type": "array", "items": { "type": "string" } }, "FundCodes": { "description": "Linked Array of 3 digit fund codes (string)", "type": "array", "items": { "type": "string" } } } }
And finally the Request and Response Action Configuration Request Configuration: (requestUrltemplate has been changed)
{ "requestUrlTemplate": "https://mywebsite.com/api/selfservice/contract/${input.ContractId}", "requestType": "GET", "headers": { "Application": "EIBPurecloudWS" }, "requestTemplate": "${input.rawRequest}" }
Response Configuration:
{ "translationMap": {}, "successTemplate": "${rawResult}" }
Jason_Mathison | 2017-12-05 18:24:00 UTC | #2
Please open up a support incident for this issue. We are probably going to need the response you get from "https://mywebsite.com/api/selfservice/contract/${input.ContractId}" (including headers, scrubbed as needed) to try to sort out what is going wrong. One limitation that you could be running into is that the remote web service has to respond with application/json.
Greg_Cunningham | 2017-12-05 18:43:00 UTC | #3
I found the coorlation id in our sumo logs, and it looks like the problem is that the response is coming back as text, not json. type=text/plain;charset=utf-8
{"t":"2017-12-05T17:19:03.019Z","message":"Response was reported as success. However, we were unable to process response.\norg.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: MessageBodyReader not found for media type=text/plain;charset=utf-8, type=class java.lang.Object, genericType=class java.lang.Object.\n\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:231)\n\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:155)\n\tat org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1085)\n\tat org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:874)\n\tat org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:808)\n\tat
Greg_Cunningham | 2017-12-05 18:50:27 UTC | #4
I entered a Bug in the development backlog for not catching this error and returning a meaningful error.
Mark_Mathis | 2017-12-05 20:43:48 UTC | #5
Thank you, made the change and everything is working now.
Jason_Mathison | 2017-12-08 15:30:09 UTC | #6
Much more robust error handling has been added to this area. The error message now includes what content type header we got and what we expect. These changes will be included in our next release to production, which will be sometime this month.
system | 2018-01-08 15:30:33 UTC | #7
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2191