I'm writing a simple url-based API that retrieves data and sends it back in one of a few formats (XML, JSON, CSV). I'm kind of on the fence about how to handle error responses. If the user supplies a format then I can just send the response in that format, but what about cases where the user requests an unsupported format?
Is it preferable then to just pick one arbitrarily and go with that? Should I look at something like sending HTTP responses a la REST APIs instead so it's a little more format agnostic?