Layer7 API Management

Expand all | Collapse all

http error

Jump to Best Answer
  • 1.  http error

    Posted 09-19-2018 09:49 PM

    Hi There,In generall when a backend server is down it returns one of the following httpRouting reason code  return between -1 to -5 can i assume this error as 500,.Since i want to send to the front some http error code? 



  • 2.  Re: http error

    Posted 09-20-2018 03:18 AM

    sharathbabuYeramalla Yes, that would be the correct assumption. 



  • 3.  Re: http error
    Best Answer

    Posted 11-09-2018 11:54 PM

    I've included a breakdown of the reason codes that you outlined above but don't imply a 500 response from the backend as the first 4 is that a response is not received.

    Message Routing Context Variables - CA API Gateway - 9.2 - CA Technologies Documentation 

    ${httpRouting.reasonCode}

    Returns one of the following reason codes when the HTTP routing fails:

    • -1 (Host Not Found): The Server referenced in the URL (for example, nonexistentServer.l7tech.com) cannot be reached. This code can be returned if either the host does not exist or the host is simply down.
    • -2 (Bad URL): The URL is incorrect. This could be caused by an incorrect character such as "#".
    • -3 (Connection timeout): An initial message was sent to the URL but no response was received before the connection timeout expired. The connection timeout value is defined in the assertion properties.
    • -4 (Read timeout): One of packets being received from the URL took longer than the read timeout value to be received. The read timeout value is defined in the assertion properties.
    • -5 (Undefined): An unknown type of error has occurred.

     

    Sincerely,

     

    Stephen Hughes

    CA Support