mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 14:08:38 +00:00
feat: beteer cors error messaging
This commit is contained in:
@@ -21,18 +21,10 @@ export const sendHttpRequestInBrowser = async (request, options) => {
|
||||
data: result.data
|
||||
};
|
||||
} catch (error) {
|
||||
if(error.response) {
|
||||
return {
|
||||
status: error.response.status,
|
||||
headers: error.response.headers,
|
||||
data: error.response.data
|
||||
};
|
||||
if(options && options.cancelTokenUid) {
|
||||
deleteCancelToken(options.cancelTokenUid);
|
||||
}
|
||||
|
||||
return {
|
||||
status: -1,
|
||||
headers: [],
|
||||
data: null
|
||||
};
|
||||
return Promise.reject(error);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user