json exception for http error codes