Forum Stats

  • 3,769,338 Users
  • 2,252,950 Discussions
  • 7,874,992 Comments

Discussions

How I can get HTTP response error message?

Edgar S.
Edgar S. Member Posts: 5 Red Ribbon
edited Sep 7, 2021 11:53AM in APEX Discussions

I make rest request using APEX_WEB_SERVICE.MAKE_REST_REQUEST function, when I get unsuccessful response status code (for example 400, 405), I didn't get body, but Oracle Apex Debug Message Data displaying:

HTTP response 405 - <message>

How I can get this message? I try to use apex_web_service.g_headers but it doesn't give me it.

Photo from Apex Debug, where is green border - my custom error, where is red border - Apex. And I think this data from HTTP header or something like that. APEX_WEB_SERVICE.MAKE_REST_REQUEST function response in this case is empty.


EDIT: solved, APEX_WEB_SERVICE.G_REASON_PHRASE.

Tagged: