Topic
  • 2 replies
  • Latest Post - ‏2012-10-02T21:05:01Z by SystemAdmin
SystemAdmin
SystemAdmin
6772 Posts

Pinned topic process backend errors - how can I distinguish between errors

‏2012-10-01T20:53:31Z |
Hi

For a MPGW serving REST web service I want to be able to pass thru HTTP status codes like 404, 409 and so on. I therefore set "process backend errors" = OFF
Now I have a problem: for both 1) when the appserver is down or 2) the appserver returns a http status code 404 the var://service/error-code is set 0x01130006
How can I now distinguish between the two cases?

To the other error codes like 0x80e00632 (HTTP invalid response) or 0x80e00059 (cannot resolve host) I do not have access. Is working with x-dp-response-code the solution? Like explained in http://www-01.ibm.com/support/docview.wss?uid=swg21499659 ?

Regards
Ray
Updated on 2012-10-02T21:05:01Z at 2012-10-02T21:05:01Z by SystemAdmin
  • swlinn
    swlinn
    1348 Posts

    Re: process backend errors - how can I distinguish between errors

    ‏2012-10-01T21:47:48Z  
    If you have process backend errors OFF, then your error rule will be driven. Look at the service variable

    var://service/error-headers string 'HTTP/1.1 400 Error Content-Type: text/xml X-Backside-Transport: FAIL FAIL Connection: close '

    You will need to parse out this message which should be matched by a regex HTTP/1.1 (0-9+) .* which would allow you to get the HTTP return code similar to x-dp-response-code.

    Regards,
    Steve
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: process backend errors - how can I distinguish between errors

    ‏2012-10-02T21:05:01Z  
    • swlinn
    • ‏2012-10-01T21:47:48Z
    If you have process backend errors OFF, then your error rule will be driven. Look at the service variable

    var://service/error-headers string 'HTTP/1.1 400 Error Content-Type: text/xml X-Backside-Transport: FAIL FAIL Connection: close '

    You will need to parse out this message which should be matched by a regex HTTP/1.1 (0-9+) .* which would allow you to get the HTTP return code similar to x-dp-response-code.

    Regards,
    Steve
    Hi Steve

    Thanks ideed for your help, will give it a try shortly

    Best regards
    Ray