1 | ;
|
2 |
|
3 | function throwProcessedException(ex, policyName) {
|
4 |
|
5 | if (ex.code === 'Forbidden.RAM') {
|
6 | console.error(`\n${ex.message}`);
|
7 | throw new Error(`\nMaybe you need grant ${policyName} policy to the sub-account or use the primary account.\nIf you don’t want use the ${policyName} policy or primary account, you can also specify the Role property for Service.`);
|
8 | }
|
9 | throw ex;
|
10 | }
|
11 |
|
12 | module.exports = { throwProcessedException }; |
\ | No newline at end of file |