News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorna Mitchell's Blog:
Error Feedback for Web Services
May 25, 2009 @ 14:29:46

In a recent post to her blog, Lorna Mitchell looks at giving feedback for errors on a web service.

Today we'll look at another really important aspect of authoring web services, and one feature that will definitely get used - error handling and feedback! Having clear and robust error handling in your service will help those trying to consume it immeasurably. Nothing is more annoying that impenetrable errors, unclear responses, or a service which accepts your input but then turns out not to have done what you expected. And I say that from experience.

She suggests that, instead of having one single error after another a more useful (and less frustrating) method is to have a "stack" of errors. Her code examples show how to added the errors to a $messages array and, at the end of the request, spit them back out in an easy to parse method.

0 comments voice your opinion now!
webservice feedback error


blog comments powered by Disqus

Similar Posts

Michael Kimsal's Blog: Suggested steps for launching a new web project

Ldeveloper Tech Blog: PHP - Fatal error: Uncaught SoapFault exception: Could not connect to host...

Zend Developer Zone: Get Your Cloud on with Zend Server CE

SitePoint PHP Blog: Pimpin Harry’s pretty bluescreen

Padraic Brady's Blog: How Would You Engineer A PEAR2/Pyrus Distribution Architecture?


Community Events

Don't see your event here?
Let us know!


development extension series api psr7 voicesoftheelephpant conference interview library community introduction podcast opinion unittest wordpress framework laravel5 laravel release language

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework