Skip to content

Commit 7cb501c

Browse files
committed
feat(Error): add response statusCode to error.message
1 parent fb2f052 commit 7cb501c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const request = ({ service, version, method, path, query, data = {}, authOptions
136136
// If we fail to parse the error text, that's okay.
137137
}
138138
}
139-
errorJSON.error += ` [${method} ${url}]`;
139+
errorJSON.error += ` [${error.statusCode||'N/A'} ${method} ${url}]`;
140140
// Transform the error into an instance of AVError by trying to parse
141141
// the error string as JSON.
142142
throw new AVError(errorJSON.code, errorJSON.error);

0 commit comments

Comments
 (0)