File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -109,19 +109,19 @@ export const defineActions = <ID extends string, S extends ActionSchema>(
109109 return ( new Proxy ( { } , {
110110 get ( _ , name ) {
111111 if ( ! ( name in schema ) ) {
112- throw new Error ( `[crm:embed:remote] Invokable ${ String ( name ) } is not present in schema ${ id } ` )
112+ return undefined
113113 }
114114
115115 const { accepts, expects } = schema [ name as keyof S ]
116116
117117 return async ( ...args : unknown [ ] ) => {
118118 if ( ! accepts ( args ) ) {
119- throw new Error ( `[crm:embed:remote] Invalid arguments for invokable ${ String ( name ) } ` )
119+ throw new Error ( `[crm:embed:remote] Invalid arguments for invokable ${ String ( name ) } in schema ${ id } ` )
120120 }
121121
122122 const result = await endpoint . call . invoke ( String ( name ) , ...args )
123123 if ( ! expects ( result ) ) {
124- throw new Error ( `[crm:embed:remote] Invalid result for invokable ${ String ( name ) } ` )
124+ throw new Error ( `[crm:embed:remote] Invalid result for invokable ${ String ( name ) } in schema ${ id } ` )
125125 }
126126
127127 return result
You can’t perform that action at this time.
0 commit comments