Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
5 replies Latest Post - ‏2013-07-26T16:26:59Z by bruneves
bruneves
bruneves
42 Posts
ACCEPTED ANSWER

Pinned topic Is it possible to change the default "Internal Error" message?

‏2013-07-25T21:02:13Z |

Hey DataPower buddies,

The requirement is simple, is it possible to change the default "Internal Error" message? If so, would that be possible to add more details explaining the reason for the "Internal Error" message? For example, if the client tries to access the wrong URI, can we show the message saying that there was no match for that URI?

Thank you!

Bruno

Updated on 2013-07-31T13:59:56Z at 2013-07-31T13:59:56Z by bruneves
  • swlinn
    swlinn
    1346 Posts
    ACCEPTED ANSWER

    Re: Is it possible to change the default "Internal Error" message?

    ‏2013-07-25T21:09:02Z  in response to bruneves

    Hi Bruno,

    Sure, you can create your own error rule that produces a customized error response (soap fault, xml, non-xml) to match the schema of your consumer.  You would create a xsl that would create this output, and the transformation action would simply use the OUTPUT context as its output.

    Regards,

    Steve

    • bruneves
      bruneves
      42 Posts
      ACCEPTED ANSWER

      Re: Is it possible to change the default "Internal Error" message?

      ‏2013-07-25T22:35:25Z  in response to swlinn

      Right, that we are doing already, but our client is more interested on changing the default "Internal Error" message, even before the request reaches a processing rule, like when you try to access a nonexistent URI for example...

      • PradeepMalineni
        PradeepMalineni
        31 Posts
        ACCEPTED ANSWER

        Re: Is it possible to change the default "Internal Error" message?

        ‏2013-07-26T02:10:07Z  in response to bruneves

        I believe that we need create a new proxy service (XML, MPGW etc..) before it reaches to your actual service and where in the first service you can create policy which modifies the Internal error message.

         

      • HermannSW
        HermannSW
        4501 Posts
        ACCEPTED ANSWER

        Re: Is it possible to change the default "Internal Error" message?

        ‏2013-07-26T12:00:24Z  in response to bruneves

        > but our client is more interested on changing the default "Internal Error" message,
        > even before the request reaches a processing rule, like when you try to access a nonexistent URI for example...
        >

        "nonexistent URI" means that your policy does not have "catch all" rules (otherwise there would be no nonexistent).

        In that case, you may add a catch all rule (eg. URL=*) as the very last Client2Server rule and return whatever you want by

        • <dp:reject>
        • and/or <xsl:message terminate="yes">

        In this case the response would not be generated by an error rule, but as described, rule processing cannot be avoided.

         

        Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

        • bruneves
          bruneves
          42 Posts
          ACCEPTED ANSWER

          Re: Is it possible to change the default "Internal Error" message?

          ‏2013-07-26T16:26:59Z  in response to HermannSW

          That makes sense! Thank you guys for the input!