Skip to content

Commit 9a24336

Browse files
committed
refactor: beautify alterTable error handler
1 parent eee3c5c commit 9a24336

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/table.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,14 +392,14 @@ export class Session extends EventEmitter implements ICreateSessionResult {
392392
if (settings) {
393393
request.operationParams = settings.operationParams;
394394
}
395-
396-
// !! does not returns response if async operation mode
395+
397396
const response = await this.api.alterTable(request);
398397
try {
399398
ensureOperationSucceeded(this.processResponseMetadata(request, response));
400399
} catch (error) {
401-
if (request.operationParams?.operationMode !== OperationMode.SYNC && error instanceof MissingStatus) {
402-
} else throw error;
400+
// !! does not returns response status if async operation mode
401+
if (request.operationParams?.operationMode !== OperationMode.SYNC && error instanceof MissingStatus) return;
402+
throw error;
403403
}
404404
}
405405

0 commit comments

Comments
 (0)