> If 400's are only ever going to represent validation errors then we > don't need the <error type="validation">. > > I'll put together a patch for the <error attribute="">. Relying on > the full message isn't going to sit well with the i18n folk.
Sending back english strings isn't going to be too useful for non-interactive users of an api, perhaps we need to think about also including some kind of 'error code'. i.e. <error attribute="first_name" code="invalid.format">First name must be letters</error> Using those two values people can deduce what's wrong without just chucking a string up to a user. This is pretty critical when your web service call isn't going to be handled by a user who can read the strings and figure out what's going on. Anyone have any opinions on this? -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
