Can't get message associated to 503 error in REST

Hi,
I face an issue by using a REST connection. I tried to contact a WM REST service from another WM application.
When the Rest service simulate http 503 error, I can’t get the message associated with the errorcode.
With errorcode 500 or 502 (for example)I’m able to get the linked message.
Do you know I can get the error message for 503?

Best Regards

Hello Adrien,

Are you referring to REST connector or REST API, can you be more specific or share the API information.

Regards,
Bharath

Hello Bharath,
It’s an API REST using pub.client:http in WM 9.12

Error message associated is in JSON Format.

Regards

@Harzac , “Error message associated is in JSON Format.”

Are you referring to header/statusMessage value or body [ either bytes/stream ]
? if so then

  • header/statusMessage value is defined based on error code incase if you are not setting up
  • body check if the your external service is providing error message for 503 case

I’m referring to the body content.

Here is my response config

CodeRetourHTTP=503
MessageRetourHTTP=CREATED
Body={ "code": "2","message": "string", "description": "string","infoURL": "string"}

-----> Empty json

CodeRetourHTTP=500
MessageRetourHTTP=CREATED
Body={ "code": "2","message": "string", "description": "string","infoURL": "string"}

-----> not empty

The case is the same by calling Java REST API or WM REST API

Hi Harzac,

Normally HTTP-503 reason would be due to target server issue.
The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code indicates that the server is not ready to handle the request .

Please check it once with concerned app provider team

Troubleshooting Facts:

  1. Reboot your server.
  2. Check to see if your web server is going through maintenance.
  3. Fix faulty firewall configurations.
  4. Sift through your server-side logs.
    etc…

HTH,
RMG

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.