Skip to content

Commit

Permalink
#3613: add console debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
twschiller committed Jun 10, 2022
1 parent 25f039c commit 0d52387
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/background/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,15 @@ export async function proxyService<TData>(
);
}

return serializableAxiosRequest<TData>(requestConfig);
try {
return await serializableAxiosRequest<TData>(requestConfig);
} catch (error) {
console.debug("Error making request without service config", {
requestConfig,
error,
});
throw error;
}
}

try {
Expand Down
2 changes: 1 addition & 1 deletion src/development/errorsBadge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let timer: NodeJS.Timeout;

function updateBadge(errorMessage: string | null): void {
void chrome.browserAction.setTitle({
title: errorMessage,
title: errorMessage ?? "Unknown error (no error message provided)",
});
void chrome.browserAction.setBadgeText({
text: counter ? String(counter) : undefined,
Expand Down

0 comments on commit 0d52387

Please sign in to comment.