stringify the error object in header

This commit is contained in:
砚然 2018-02-08 22:42:30 +08:00
parent 98fc3fa2ee
commit 1fd69b3e87

View File

@ -44,7 +44,7 @@ const getErrorResponse = (error, fullUrl) => {
header: { header: {
'Content-Type': 'text/html; charset=utf-8', 'Content-Type': 'text/html; charset=utf-8',
'Proxy-Error': true, 'Proxy-Error': true,
'Proxy-Error-Message': error || 'null' 'Proxy-Error-Message': error ? JSON.stringify(error) : 'null'
}, },
body: requestErrorHandler.getErrorContent(error, fullUrl) body: requestErrorHandler.getErrorContent(error, fullUrl)
}; };