Skip to content

Commit 1a0b4bf

Browse files
committed
fix: role check error
1 parent 1a53027 commit 1a0b4bf

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/serverless.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,13 @@ class ServerlessComponent extends Component {
8181

8282
const camClient = new Cam(credentials)
8383
if (!inputs.role) {
84-
const roleExist = await camClient.CheckSCFExcuteRole()
85-
if (roleExist) {
86-
inputs.role = 'QCS_SCFExcuteRole'
84+
try {
85+
const roleExist = await camClient.CheckSCFExcuteRole()
86+
if (roleExist) {
87+
inputs.role = 'QCS_SCFExcuteRole'
88+
}
89+
} catch (e) {
90+
// no op
8791
}
8892
}
8993

0 commit comments

Comments
 (0)