Skip to content

Commit f25bcdd

Browse files
committed
improve typings
1 parent 9042ca6 commit f25bcdd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/global.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ interface Window { }
33

44
namespace App {
55
interface Error {
6-
type: string = 'unknown',
6+
type?: string,
77
}
88

99
interface HandleClientError {
1010
message: string;
1111
status?: number;
12-
type: string;
12+
type?: string;
1313
}
1414
}

src/hooks.client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Sentry.init({
1313

1414
export const handleError: HandleClientError = ({ error, message, status }) => {
1515
console.error(error);
16-
let type = 'unknown';
16+
17+
let type;
1718
if (error instanceof AppwriteException) {
1819
status = error.code === 0 ? undefined : error.code;
1920
message = error.message;

0 commit comments

Comments
 (0)