On Wed, 2010-07-28 at 12:21 +0200, [email protected] wrote: > I added 'safely do...end' wrap around all methods which are touching > backend clouds in drivers. So now instead of just getting 'Internal Server > Error' > you will get HTML/XML representation of backend exception (status 500).
Nice. > One question remains open. Is there any 'standard' way in REST > to report errors/exceptions ? None that I know of, besides using HTTP status codes judiciously. In this case, a 500 or 502 seem the most appropriate codes. Actually, I think 502 is the best bet here, since it let's clients distinguish between a bug in the Deltacloud server and the backend. This would be a good topic for rest-practices. > Right now we are using this: > > <error status="500" url="/api/instances.xml"> > <kind>backend_error</kind> > <backend driver="ec2"> > <code>500</code> > <message>The request signature we calculated does not match the signature > you provided. Check your AWS Secret Access Key and signing method. Consult > the service documentation for details.</message> > <cause>AWS::SignatureDoesNotMatch</cause> > <details>...backtrace goes here...</details> > </backend> > </error> > > Possible additions could be: 'backend request url', 'timestamp', > 'raw response from backend', etc... Let me know what do you think. I think this is good enough for now. David
