File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,7 +235,9 @@ async function makeService({serviceName,
235235 try {
236236 service = await fc . getService ( serviceName ) ;
237237 } catch ( ex ) {
238- if ( ex . code !== 'ServiceNotFound' ) {
238+ if ( ex . code === 'AccessDenied' ) {
239+ throw ex ;
240+ } else if ( ex . code !== 'ServiceNotFound' ) {
239241 console . log ( red ( `\tretry ${ times } times` ) ) ;
240242 retry ( ex ) ;
241243 }
@@ -596,8 +598,13 @@ async function makeApi(group, {
596598 ApiName : apiName ,
597599 GroupId : group . GroupId
598600 } ) ;
599-
600- var api = result . ApiSummarys && result . ApiSummarys . ApiSummary [ 0 ] ;
601+
602+ var apiSummarys = result . ApiSummarys && result . ApiSummarys . ApiSummary ;
603+ var api ;
604+
605+ if ( apiSummarys ) {
606+ api = apiSummarys . find ( summary => summary . ApiName === apiName ) ;
607+ }
601608
602609 const requestParameters = parameters . map ( ( item ) => {
603610 return Object . assign ( getDefaultRequestParameter ( ) , item ) ;
You can’t perform that action at this time.
0 commit comments