Loading ...
Sorry, an error occurred while loading the content.

5858When is a fault not a fault

Expand Messages
  • wrwbayview
    Feb 16, 2007
    • 0 Attachment
      I'm working on a project that needs to follow this logic:

      Try the request
      If failed with "Invalid Login" error message, then:
      Ask user for username/password
      Send "Authenticate" request, which should set a cookie
      Try the original request again
      If failed for any reason, give error and exit.

      We use the "on_fault" method to set a handler to deal with errors,
      including the "Invalid Login" error. But in the specific case of an
      "Invalid Login" (on the initial request only) we want to trap that
      differently.

      I looked through the POD docs and the Perl code of SOAP::Lite itself
      and it's not really clear how the exception handling can deal with this.

      What I'm looking for is behavior similar to the way in Perl, you can
      use $SIG{__DIE__} to trap an error, and depending on what the error
      is, maybe ignore it. There doesn't seem to be any way to ignore an
      error in SOAP::Lite's on_fault error handler.

      Any tips?