File tree 1 file changed +10
-5
lines changed
packages/salesforce/src/connection/metadata
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,16 @@ export class MetadataApi implements DeploymentApi {
51
51
52
52
private invoke < K extends keyof MetadataResponses > ( method : K , message : object , responsePath ?: string ) : Promise < MetadataResponses [ K ] > ;
53
53
private async invoke < T > ( method : string , message : object , responsePath ?: string ) : Promise < T > {
54
- const response = await this . soap . request ( method , message , {
55
- requestSchema : Operations [ method ] ?. request ,
56
- responseSchema : Operations [ method ] ?. response
57
- } ) ;
58
- return ( responsePath ? getObjectProperty ( response . body , responsePath ) : response . body ) as T ;
54
+ try {
55
+ const response = await this . soap . request ( method , message , {
56
+ requestSchema : Operations [ method ] ?. request ,
57
+ responseSchema : Operations [ method ] ?. response
58
+ } ) ;
59
+ return ( responsePath ? getObjectProperty ( response . body , responsePath ) : response . body ) as T ;
60
+ } catch ( err ) {
61
+ this . connection . emit ( 'error' , err ) ;
62
+ throw err ;
63
+ }
59
64
}
60
65
61
66
private convertArray < T > ( value : T | T [ ] , asArray : true ) : T [ ] ;
You can’t perform that action at this time.
0 commit comments