feat: Capture unhandled errors by restructuring apps
This commit is contained in:
@@ -25,7 +25,7 @@ const findMessage = async ($: IGlobalVariable, options: FindMessageOptions) => {
|
||||
data: {
|
||||
raw: data?.messages.matches[0],
|
||||
},
|
||||
error: response?.integrationError || (!data.ok && data),
|
||||
error: response?.httpError || (!data.ok && data),
|
||||
};
|
||||
|
||||
return message;
|
||||
|
@@ -16,7 +16,7 @@ const postMessage = async (
|
||||
data: {
|
||||
raw: response?.data?.message,
|
||||
},
|
||||
error: response?.integrationError,
|
||||
error: response?.httpError,
|
||||
};
|
||||
|
||||
if (response.data.ok === false) {
|
||||
|
@@ -15,8 +15,8 @@ export default {
|
||||
|
||||
const response = await $.http.get('/conversations.list');
|
||||
|
||||
if (response.integrationError) {
|
||||
channels.error = response.integrationError;
|
||||
if (response.httpError) {
|
||||
channels.error = response.httpError;
|
||||
return channels;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user