File tree Expand file tree Collapse file tree 5 files changed +26
-14
lines changed Expand file tree Collapse file tree 5 files changed +26
-14
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @gitbook/integration-figma ' : minor
3
+ ' @gitbook/integration-slack ' : minor
4
+ ---
5
+
6
+ Figma and slack exposable error
Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @gitbook/integration-slack ' : minor
3
+ ---
4
+
5
+ Throw exposable error when slack is not configured
Original file line number Diff line number Diff line change 78
78
},
79
79
"integrations/fathom" : {
80
80
"name" : " @gitbook/integration-fathom" ,
81
- "version" : " 0.5.2 " ,
81
+ "version" : " 0.6.0 " ,
82
82
"dependencies" : {
83
83
"@gitbook/api" : " *" ,
84
84
"@gitbook/runtime" : " *" ,
101
101
},
102
102
"integrations/formspree" : {
103
103
"name" : " @gitbook/integration-formspree" ,
104
- "version" : " 0.2.9 " ,
104
+ "version" : " 0.2.11 " ,
105
105
"dependencies" : {
106
106
"@gitbook/runtime" : " workspace:*" ,
107
107
},
204
204
},
205
205
"integrations/heap" : {
206
206
"name" : " @gitbook/integration-heap" ,
207
- "version" : " 0.5.2 " ,
207
+ "version" : " 0.6.0 " ,
208
208
"dependencies" : {
209
209
"@gitbook/api" : " *" ,
210
210
"@gitbook/runtime" : " *" ,
227
227
},
228
228
"integrations/hotjar" : {
229
229
"name" : " @gitbook/integration-hotjar" ,
230
- "version" : " 0.5.2 " ,
230
+ "version" : " 0.6.0 " ,
231
231
"dependencies" : {
232
232
"@gitbook/api" : " *" ,
233
233
"@gitbook/runtime" : " *" ,
331
331
},
332
332
"integrations/mailchimp" : {
333
333
"name" : " @gitbook/integration-mailchimp" ,
334
- "version" : " 1.1.2 " ,
334
+ "version" : " 1.2.0 " ,
335
335
"dependencies" : {
336
336
"@gitbook/runtime" : " *" ,
337
337
"itty-router" : " ^2.6.1" ,
369
369
},
370
370
"integrations/mixpanel" : {
371
371
"name" : " @gitbook/integration-mixpanel" ,
372
- "version" : " 0.4.2 " ,
372
+ "version" : " 0.5.0 " ,
373
373
"dependencies" : {
374
374
"@gitbook/api" : " *" ,
375
375
"@gitbook/runtime" : " *" ,
407
407
},
408
408
"integrations/plausible" : {
409
409
"name" : " @gitbook/integration-plausible" ,
410
- "version" : " 0.5.2 " ,
410
+ "version" : " 0.6.0 " ,
411
411
"dependencies" : {
412
412
"@gitbook/api" : " *" ,
413
413
"@gitbook/runtime" : " *" ,
419
419
},
420
420
"integrations/posthog" : {
421
421
"name" : " @gitbook/integration-posthog" ,
422
- "version" : " 1.0 .0" ,
422
+ "version" : " 1.1 .0" ,
423
423
"dependencies" : {
424
424
"@gitbook/api" : " *" ,
425
425
"@gitbook/runtime" : " *" ,
431
431
},
432
432
"integrations/reo" : {
433
433
"name" : " @gitbook/integration-reo.dev" ,
434
- "version" : " 0.3.2 " ,
434
+ "version" : " 0.4.0 " ,
435
435
"dependencies" : {
436
436
"@gitbook/api" : " *" ,
437
437
"@gitbook/runtime" : " *" ,
614
614
},
615
615
"packages/api" : {
616
616
"name" : " @gitbook/api" ,
617
- "version" : " 0.129 .0" ,
617
+ "version" : " 0.131 .0" ,
618
618
"dependencies" : {
619
619
"event-iterator" : " ^2.0.0" ,
620
620
"eventsource-parser" : " ^3.0.0" ,
669
669
},
670
670
"packages/runtime" : {
671
671
"name" : " @gitbook/runtime" ,
672
- "version" : " 0.20 .0" ,
672
+ "version" : " 0.21 .0" ,
673
673
"dependencies" : {
674
674
"@gitbook/api" : " *" ,
675
675
},
Original file line number Diff line number Diff line change
1
+ import { ExposableError } from '@gitbook/runtime' ;
1
2
import { FigmaRuntimeContext } from './types' ;
2
3
3
4
export interface FileNodeId {
@@ -135,7 +136,7 @@ export async function fetchFigmaAPI<T>(
135
136
) : Promise < T > {
136
137
const accessToken = environment . installation ?. configuration . oauth_credentials ?. access_token ;
137
138
if ( ! accessToken ) {
138
- throw new Error ( 'Missing authentication ') ;
139
+ throw new ExposableError ( 'Integration is not authenticated ') ;
139
140
}
140
141
141
142
const url = new URL ( `https://api.figma.com/v1/${ path } ` ) ;
Original file line number Diff line number Diff line change 1
- import { Logger } from '@gitbook/runtime' ;
1
+ import { ExposableError , Logger } from '@gitbook/runtime' ;
2
2
3
3
import { SlackRuntimeContext } from './configuration' ;
4
4
@@ -110,7 +110,7 @@ export async function slackAPI<Result>(
110
110
environment . installation ?. configuration . oauth_credentials ?. access_token ;
111
111
112
112
if ( ! accessToken ) {
113
- throw new Error ( 'No authentication token provided ') ;
113
+ throw new ExposableError ( 'Integration is not authenticated ') ;
114
114
}
115
115
116
116
const url = request . responseUrl
You can’t perform that action at this time.
0 commit comments