The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Webservice Error Handling

Last post 11-21-2008 6:42 AM by Kemp. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-19-2008 9:54 AM

    Webservice Error Handling

    I stumbled on a piece of SOAP today and this lead me to the discovery of a quite interesting Webservice response:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">   <soapenv:Body>     <soapenv:Fault>       <faultcode>soapenv:Server.userException</faultcode>       <faultstring>java.lang.NumberFormatException: For input string: &quot;3,14&quot;</faultstring>       <detail/>     </soapenv:Fault>   </soapenv:Body> </soapenv:Envelope>

    Who had the idea to just forward the exception message to the Webservice? I bet they wouldn't like little Bobby Tables at all, too.

     

  • 11-19-2008 9:55 AM In reply to

    Re: Webservice Error Handling

    whoever:
    I stumbled on a piece of SOAP today
    "What is this soap doing here?!  I don't bathe!"

  • 11-19-2008 10:28 AM In reply to

    • APH
    • Not Ranked
    • Joined on 06-08-2007
    • Posts 9

    Re: Webservice Error Handling

    So, it would be better to not provide information as to the cause of the error?
  • 11-19-2008 11:30 AM In reply to

    Re: Webservice Error Handling

     nothing wrong here.

  • 11-19-2008 12:00 PM In reply to

    Re: Webservice Error Handling

    bstorer:

    whoever:
    I stumbled on a piece of SOAP today
    "What is this soap doing here?!  I don't bathe!"

    And then he bent over to pick it up...

    < pstorer> Bans don't mean shit on the forum. It's like being on the Sex Offender List. You can still entice kids into your van with candy.

    Want more? Go the IRC channel #TDWTFMafia on irc.slashnet.org.
  • 11-19-2008 1:49 PM In reply to

    Re: Webservice Error Handling

    whoever:
    I stumbled on a piece of SOAP today
    "Stumbled"?  "Slipped", surely?

  • 11-21-2008 6:42 AM In reply to

    • Kemp
    • Top 500 Contributor
    • Joined on 09-21-2006
    • Posts 108

    Re: Webservice Error Handling

    APH:
    So, it would be better to not provide information as to the cause of the error?
     

    It would be better to provide a meaningful error message rather than forwarding a message like that. Parsing a custom message is a lot easier for client apps than parsing some random string you happened to get handed by the system. Plus if you ever migrate to another platform (or indeed, simply upgrade your current one, even minor versions in some cases), the message could completely change, meaning all the client apps suddenly have to know to expect something else in order to tell the user "you number was invalid".

Page 1 of 1 (7 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems