Layer7 API Management

 View Only

Possibillity to capture HTTP Method error and HTTP routing error

  • 1.  Possibillity to capture HTTP Method error and HTTP routing error

    Posted Apr 01, 2019 08:31 AM

    Hello

     

    During my process on creating a custom logging behavior, I noticed two things I'm unable to capture.

    1. When a disabled HTTP method is used on an endpoint

    2. When an "undefined" routing error occurs during the HTTP routing assertion, e.g. certificate issue

     

    I actually found an article that covers a workaround for #1, however this workaround would require us to heavily change our current logic in use. The problem is, we have over 100 APIs that use the same included policy fragment but only differ between their allowed HTTP methods which we can change within the service properties themselves. The workaround would require us to have a slightly customized policy on each API so this isn't really an option for us. It would be much easier if the CA API Gateway writes this error to a variable that we could capture and read to put this into our customized log.

     

    For #2 it's quite the same. While we can actually check the reasonCode value equaling -5, it simply says "undefined" which doesn't help us at all since it could be any error. Luckily the gateway seems to write the certificate error into the audit just like the HTTP method error.

     

    According to the support, this seems to be quite a difficult new feature that has to be implemented but I'd gladly appreciate it. Would it be possible to implement this new feature in a future release?