Skip to content

Commit ecbf4ab

Browse files
authored
fix(serverless-api): do not retry for HTTP client request errors (#285)
1 parent f12a9e6 commit ecbf4ab

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

packages/serverless-api/src/client.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,8 @@ export class TwilioServerlessApiClient extends events.EventEmitter {
343343
*/
344344
async activateBuild(activateConfig: ActivateConfig): Promise<ActivateResult> {
345345
try {
346-
let {
347-
buildSid,
348-
targetEnvironment,
349-
serviceSid,
350-
sourceEnvironment,
351-
env,
352-
} = activateConfig;
346+
let { buildSid, targetEnvironment, serviceSid, sourceEnvironment, env } =
347+
activateConfig;
353348

354349
if (!buildSid && !sourceEnvironment) {
355350
const error = new Error(
@@ -688,6 +683,7 @@ export class TwilioServerlessApiClient extends events.EventEmitter {
688683
limit: this.config.retryLimit || RETRY_LIMIT,
689684
methods: ['GET', 'POST', 'DELETE'],
690685
statusCodes: [429],
686+
errorCodes: [],
691687
};
692688
return this.limit(() => this.client[method](path, options));
693689
}

0 commit comments

Comments
 (0)