mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-27 06:34:06 +00:00
revert custom error messages
This commit is contained in:
@@ -93,14 +93,12 @@ function makeAxiosInstance({ requestMaxRedirects = 5, disableCookies } = {}) {
|
||||
if (redirectResponseCodes.includes(error.response.status)) {
|
||||
if (redirectCount >= requestMaxRedirects) {
|
||||
// todo: needs to be discussed whether the original error response message should be modified or not
|
||||
error.response.data = `Maximum redirects (${requestMaxRedirects}) exceeded`;
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
const locationHeader = error.response.headers.location;
|
||||
if (!locationHeader) {
|
||||
// todo: needs to be discussed whether the original error response message should be modified or not
|
||||
error.response.data = 'Redirect location header missing';
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
|
||||
@@ -275,8 +275,6 @@ function makeAxiosInstance({
|
||||
type: 'error',
|
||||
message: safeStringifyJSON(errorResponseData?.toString?.())
|
||||
});
|
||||
// todo: needs to be discussed whether the original error response message should be modified or not
|
||||
error.response.data = `Maximum redirects (${requestMaxRedirects}) exceeded`;
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user