added error codes to all requests