Hello Everyone,
Hope all is well.
Please we are setting a Web service data action to connect to an Oracle REST API endpoint.
We have an issue where the Oracle endpoint is not accepting the “Content-Type” header in the GET request.
In our data action we are not sending any “Content-Type” header, however, Oracle is seeing this and rejecting it:
{
"Authorization": [
""
]
}
Response from Oracle:
{
"message": "The server encountered an unexpected condition which prevented it from fulfilling the request.",
"code": "internal.server.error",
"status": 500,
"messageParams": {},
"contextId": "8658c036-4b5e-4c96-b75e-fcf02e666095",
"details": [
{
"errorCode": "ACTION.REMOTE_ENDPOINT"
}
],
"errors": [
{
"message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service: \n\nError 415--Unsupported Media Type\n\n<BODY bgcolor="white">\n
\n
\n<FONT FACE="Helvetica" COLOR="black" SIZE="3"> Error 415--Unsupported Media Type\n |
<FONT FACE="Courier New">From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:10.4.16 415--Unsupported Media Type\n |
"code": "INTERNAL_SERVER_ERROR",
"status": 415,
"messageParams": {},
"details": [],
"errors": []
}
]
}
Customer reached out to Oracle support and they have advised that Oracle does not accept any content type header for GET requests.
We found this Oracle Support Document below that explains the behaviour.
The Oracle document does mention for GET operation (with no request payload), sending Content-Type header is invalid and OIC will reject it with "Error 415--Unsupported Media Type" and it's work as designed.
This looks like the intended design by Oracle.
Oracle suggestion is to work with the client application to remove the header for GET operation.
According to this post, it appears that Genesys Cloud sends the content-type: JSON by default:
Please could we check if there is any way we can work around this limitation? Thank you.
Thanks and regards,
Kevin Qi