Skip to content

Commit 8d14b37

Browse files
committed
fix: update error message
1 parent 764287e commit 8d14b37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/serverless.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const { Component } = require('@serverless/core')
22
const { MultiApigw, Scf, Apigw, Cns } = require('tencent-component-toolkit')
3+
const { TypeError } = require('tencent-component-toolkit/src/utils/error')
34
const { uploadCodeToCos, getDefaultProtocol, deleteRecord, prepareInputs } = require('./utils')
45
const CONFIGS = require('./config')
56

@@ -8,7 +9,8 @@ class ServerlessComponent extends Component {
89
const { tmpSecrets } = this.credentials.tencent
910

1011
if (!tmpSecrets || !tmpSecrets.TmpSecretId) {
11-
throw new Error(
12+
throw new TypeError(
13+
'CREDENTIAL',
1214
'Cannot get secretId/Key, your account could be sub-account and does not have the access to use SLS_QcsRole, please make sure the role exists first, then visit https://cloud.tencent.com/document/product/1154/43006, follow the instructions to bind the role to your account.'
1315
)
1416
}

0 commit comments

Comments
 (0)