Use return await to catch exceptions (#6109)

So the exceptions are handled properly and filtered in sentry
This commit is contained in:
Thomas Trompette
2024-07-03 11:14:28 +02:00
committed by GitHub
parent 5b26452649
commit 4183e5460d
5 changed files with 38 additions and 20 deletions
@@ -21,7 +21,7 @@ export class RemoteTableResolver {
@AuthWorkspace() { id: workspaceId }: Workspace,
) {
try {
return this.remoteTableService.findDistantTablesWithStatus(
return await this.remoteTableService.findDistantTablesWithStatus(
input.id,
workspaceId,
input.shouldFetchPendingSchemaUpdates,
@@ -37,7 +37,7 @@ export class RemoteTableResolver {
@AuthWorkspace() { id: workspaceId }: Workspace,
) {
try {
return this.remoteTableService.syncRemoteTable(input, workspaceId);
return await this.remoteTableService.syncRemoteTable(input, workspaceId);
} catch (error) {
remoteTableGraphqlApiExceptionHandler(error);
}
@@ -49,7 +49,10 @@ export class RemoteTableResolver {
@AuthWorkspace() { id: workspaceId }: Workspace,
) {
try {
return this.remoteTableService.unsyncRemoteTable(input, workspaceId);
return await this.remoteTableService.unsyncRemoteTable(
input,
workspaceId,
);
} catch (error) {
remoteTableGraphqlApiExceptionHandler(error);
}
@@ -61,7 +64,7 @@ export class RemoteTableResolver {
@AuthWorkspace() { id: workspaceId }: Workspace,
) {
try {
return this.remoteTableService.syncRemoteTableSchemaChanges(
return await this.remoteTableService.syncRemoteTableSchemaChanges(
input,
workspaceId,
);