File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -773,6 +773,7 @@ export class ServerClient {
773773 * @param opts.headers - The headers to include in the request. Note that the
774774 * Authorization header will always be set with an OAuth access token
775775 * retrieved by the client.
776+ * @param authType - The type of authorization to use for the request.
776777 *
777778 * @returns A promise resolving to the response from the workflow.
778779 *
@@ -869,8 +870,8 @@ export class ServerClient {
869870 throw new Error ( "External user ID is required" ) ;
870871 }
871872
872- if ( ! this . publicKey ) {
873- throw new Error ( "Project public key is required to map the external user ID to the correct project " ) ;
873+ if ( ! this . oauthClient ) {
874+ throw new Error ( "OAuth is required for invoking workflows for external users. Please pass credentials for a valid OAuth client " ) ;
874875 }
875876
876877 return this . invokeWorkflow ( url , {
@@ -879,6 +880,6 @@ export class ServerClient {
879880 ...headers ,
880881 "X-PD-External-User-ID" : externalUserId ,
881882 } ,
882- } ) ;
883+ } , HTTPAuthType . OAuth ) ; // OAuth auth is required for invoking workflows for external users
883884 }
884885}
You can’t perform that action at this time.
0 commit comments