Errors and error messages

Add HTTP, JSON and status errors in the API