File tree 3 files changed +15
-3
lines changed
3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export enum ClientErrorCode {
27
27
}
28
28
29
29
/**
30
- * Error codes on errors thrown by the [[ Client]] .
30
+ * Error codes on errors thrown by the ` Client` .
31
31
*/
32
32
export type NotionErrorCode = APIErrorCode | ClientErrorCode
33
33
@@ -82,6 +82,9 @@ export function isNotionClientErrorWithCode<Code extends NotionErrorCode>(
82
82
return isNotionClientError ( error ) && error . code in codes
83
83
}
84
84
85
+ /**
86
+ * Error thrown by the client if a request times out.
87
+ */
85
88
export class RequestTimeoutError extends NotionClientErrorBase < ClientErrorCode . RequestTimeout > {
86
89
readonly code = ClientErrorCode . RequestTimeout
87
90
readonly name = "RequestTimeoutError"
@@ -150,6 +153,7 @@ export function isHTTPResponseError(
150
153
UnknownHTTPResponseError | APIResponseError ,
151
154
typeof error
152
155
>
156
+
153
157
return true
154
158
}
155
159
Original file line number Diff line number Diff line change 1
1
export { default as Client } from "./Client"
2
2
export { LogLevel , Logger } from "./logging"
3
3
export {
4
+ // Error codes
5
+ NotionErrorCode ,
4
6
APIErrorCode ,
7
+ ClientErrorCode ,
8
+ // Error types
9
+ NotionClientError ,
5
10
APIResponseError ,
6
- HTTPResponseError ,
11
+ UnknownHTTPResponseError ,
7
12
RequestTimeoutError ,
13
+ // Error helpers
14
+ isNotionClientError ,
15
+ isNotionClientErrorWithCode ,
8
16
} from "./errors"
Original file line number Diff line number Diff line change 29
29
"resolveJsonModule" : true ,
30
30
31
31
// Linter style rules
32
- "noUnusedLocals" : true ,
32
+ "noUnusedLocals" : false , // Disabled because we use eslint for this.
33
33
"noUnusedParameters" : true ,
34
34
"noImplicitReturns" : true ,
35
35
"noFallthroughCasesInSwitch" : true ,
You can’t perform that action at this time.
0 commit comments