Cleanup logging levels in WebAPI
This commit is contained in:
parent
08aa3c1365
commit
9d5ab04195
2 changed files with 8 additions and 6 deletions
|
@ -23,7 +23,9 @@ const createProps = (
|
||||||
me: getDefaultConversation(),
|
me: getDefaultConversation(),
|
||||||
navTabsCollapsed: Boolean(overrideProps.navTabsCollapsed),
|
navTabsCollapsed: Boolean(overrideProps.navTabsCollapsed),
|
||||||
onChangeLocation: action('onChangeLocation'),
|
onChangeLocation: action('onChangeLocation'),
|
||||||
|
onDismissProfileMovedModal: action('onDismissProfileMovedModal'),
|
||||||
onToggleNavTabsCollapse: action('onToggleNavTabsCollapse'),
|
onToggleNavTabsCollapse: action('onToggleNavTabsCollapse'),
|
||||||
|
profileMovedModalNeeded: false,
|
||||||
renderCallsTab: () => <div>Calls Tab goes here</div>,
|
renderCallsTab: () => <div>Calls Tab goes here</div>,
|
||||||
renderChatsTab: () => <div>Chats Tab goes here</div>,
|
renderChatsTab: () => <div>Chats Tab goes here</div>,
|
||||||
renderStoriesTab: () => <div>Stories Tab goes here</div>,
|
renderStoriesTab: () => <div>Stories Tab goes here</div>,
|
||||||
|
|
|
@ -415,7 +415,7 @@ async function _promiseAjax<Type extends ResponseType, OutputShape>(
|
||||||
if (isAbortError(e)) {
|
if (isAbortError(e)) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
log.error(logId, 0, 'Error');
|
log.warn(logId, 0, 'Error');
|
||||||
const stack = `${e.stack}\nInitial stack:\n${options.stack}`;
|
const stack = `${e.stack}\nInitial stack:\n${options.stack}`;
|
||||||
throw makeHTTPError('promiseAjax catch', 0, {}, e.toString(), stack);
|
throw makeHTTPError('promiseAjax catch', 0, {}, e.toString(), stack);
|
||||||
}
|
}
|
||||||
|
@ -453,7 +453,7 @@ async function _promiseAjax<Type extends ResponseType, OutputShape>(
|
||||||
await handleStatusCode(response.status);
|
await handleStatusCode(response.status);
|
||||||
|
|
||||||
if (!unauthenticated && response.status === 401) {
|
if (!unauthenticated && response.status === 401) {
|
||||||
log.error('Got 401 from Signal Server. We might be unlinked.');
|
log.warn('Got 401 from Signal Server. We might be unlinked.');
|
||||||
window.Whisper.events.trigger('mightBeUnlinked');
|
window.Whisper.events.trigger('mightBeUnlinked');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -489,7 +489,7 @@ async function _promiseAjax<Type extends ResponseType, OutputShape>(
|
||||||
if (isAbortError(error)) {
|
if (isAbortError(error)) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
log.error(logId, response.status, 'Error');
|
log.warn(logId, response.status, 'Error');
|
||||||
const stack = `${error.stack}\nInitial stack:\n${options.stack}`;
|
const stack = `${error.stack}\nInitial stack:\n${options.stack}`;
|
||||||
throw makeHTTPError(
|
throw makeHTTPError(
|
||||||
`promiseAjax: error parsing body (Content-Type: ${response.headers.get('content-type')})`,
|
`promiseAjax: error parsing body (Content-Type: ${response.headers.get('content-type')})`,
|
||||||
|
@ -500,7 +500,7 @@ async function _promiseAjax<Type extends ResponseType, OutputShape>(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isSuccess(response.status)) {
|
if (!isSuccess(response.status)) {
|
||||||
log.error(logId, response.status, 'Error');
|
log.warn(logId, response.status, 'Error');
|
||||||
|
|
||||||
throw makeHTTPError(
|
throw makeHTTPError(
|
||||||
'promiseAjax: error response',
|
'promiseAjax: error response',
|
||||||
|
@ -2553,7 +2553,7 @@ export function initialize({
|
||||||
return result.data;
|
return result.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.warn(
|
log.error(
|
||||||
'WebAPI: invalid response from postBatchIdentityCheck',
|
'WebAPI: invalid response from postBatchIdentityCheck',
|
||||||
toLogFormat(result.error)
|
toLogFormat(result.error)
|
||||||
);
|
);
|
||||||
|
@ -3842,7 +3842,7 @@ export function initialize({
|
||||||
return parseResult.data;
|
return parseResult.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.warn(
|
log.error(
|
||||||
'WebAPI: invalid response from sendWithSenderKey',
|
'WebAPI: invalid response from sendWithSenderKey',
|
||||||
toLogFormat(parseResult.error)
|
toLogFormat(parseResult.error)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue