diff --git a/src/error.ts b/src/error.ts index ccba9be2..2f4afced 100644 --- a/src/error.ts +++ b/src/error.ts @@ -29,7 +29,9 @@ export function createFetchError( const requestStr = `[${method}] ${JSON.stringify(url)}`; const statusStr = ctx.response - ? `${ctx.response.status} ${ctx.response.statusText}` + ? `${ctx.response.status}${ + ctx.response.statusText ? ` ${ctx.response.statusText}` : "" + }` : ""; const message = `${requestStr}: ${statusStr}${