Handle some errors and first version with content negotiation