@@ -194,26 +194,31 @@ func TestHandleErrorResp(t *testing.T) {
194194 {
195195 "error":{}
196196 }` )),
197- expected : "error, status code: 503, status: , message: " ,
197+ expected : `error, status code: 503, status: , message: , body:
198+ {
199+ "error":{}
200+ }` ,
198201 },
199202 {
200203 name : "413 Request Entity Too Large" ,
201204 httpCode : http .StatusRequestEntityTooLarge ,
202205 contentType : "text/html" ,
203- body : bytes .NewReader ([]byte (`<html>
204- <head><title>413 Request Entity Too Large</title></head>
205- <body>
206- <center><h1>413 Request Entity Too Large</h1></center>
207- <hr><center>nginx</center>
208- </body>
209- </html>` )),
210- expected : `error, status code: 413, status: , body: <html>
211- <head><title>413 Request Entity Too Large</title></head>
212- <body>
213- <center><h1>413 Request Entity Too Large</h1></center>
214- <hr><center>nginx</center>
215- </body>
216- </html>` ,
206+ body : bytes .NewReader ([]byte (`
207+ <html>
208+ <head><title>413 Request Entity Too Large</title></head>
209+ <body>
210+ <center><h1>413 Request Entity Too Large</h1></center>
211+ <hr><center>nginx</center>
212+ </body>
213+ </html>` )),
214+ expected : `error, status code: 413, status: , message: invalid character '<' looking for beginning of value, body:
215+ <html>
216+ <head><title>413 Request Entity Too Large</title></head>
217+ <body>
218+ <center><h1>413 Request Entity Too Large</h1></center>
219+ <hr><center>nginx</center>
220+ </body>
221+ </html>` ,
217222 },
218223 {
219224 name : "errorReader" ,
0 commit comments