File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @trigger.dev/typeform " : patch
3+ " @trigger.dev/github " : patch
4+ " @trigger.dev/openai " : patch
5+ " @trigger.dev/resend " : patch
6+ " @trigger.dev/plain " : patch
7+ ---
8+
9+ Missing token/apikey error improved for display in Next.js logs
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ function createClientFromOptions(
9393 options : GithubIntegrationOptions
9494) : IntegrationClient < Octokit , typeof tasks > {
9595 if ( Object . keys ( options ) . includes ( "token" ) && ! options . token ) {
96- throw new Error ( ` GitHub integration (${ options . id } ) token was undefined`) ;
96+ throw `Can't create GitHub integration (${ options . id } ) as token was undefined`;
9797 }
9898
9999 if ( options . token ) {
Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ export class OpenAI
1010
1111 constructor ( private options : OpenAIIntegrationOptions ) {
1212 if ( Object . keys ( options ) . includes ( "apiKey" ) && ! options . apiKey ) {
13- throw new Error (
14- `OpenAI integration (${ options . id } ) apiKey was undefined`
15- ) ;
13+ throw `Can't create OpenAI integration (${ options . id } ) as apiKey was undefined` ;
1614 }
1715
1816 this . client = {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export class Plain implements PlainIntegration {
1818
1919 constructor ( private options : PlainIntegrationOptions ) {
2020 if ( Object . keys ( options ) . includes ( "apiKey" ) && ! options . apiKey ) {
21- throw new Error ( ` Plain integration (${ options . id } ) apiKey was undefined`) ;
21+ throw `Can't create Plain integration (${ options . id } ) as apiKey was undefined`;
2222 }
2323
2424 this . client = {
Original file line number Diff line number Diff line change @@ -57,9 +57,7 @@ export class Resend
5757
5858 constructor ( private options : ResendIntegrationOptions ) {
5959 if ( Object . keys ( options ) . includes ( "apiKey" ) && ! options . apiKey ) {
60- throw new Error (
61- `Resend integration (${ options . id } ) apiKey was undefined`
62- ) ;
60+ throw `Can't create Resend integration (${ options . id } ) as apiKey was undefined` ;
6361 }
6462
6563 this . client = {
Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ export class Typeform implements TypeformIntegration {
3535
3636 constructor ( private options : TypeformIntegrationOptions ) {
3737 if ( Object . keys ( options ) . includes ( "token" ) && ! options . token ) {
38- throw new Error (
39- `Typeform integration (${ options . id } ) token was undefined`
40- ) ;
38+ throw `Can't create Typeform integration (${ options . id } ) as token was undefined` ;
4139 }
4240
4341 this . client = {
You can’t perform that action at this time.
0 commit comments