Add json support for error response