Fix assert unreachable, remove unused variables (#13753)

Small code cleanup
This commit is contained in:
Félix Malfait
2025-08-08 09:04:45 +02:00
committed by GitHub
parent 8b4b9ef8da
commit 0236f79ccf
105 changed files with 172 additions and 315 deletions
@@ -1,3 +1,5 @@
import { assertUnreachable } from 'twenty-shared/utils';
import {
ConflictError,
NotFoundError,
@@ -21,9 +23,7 @@ export const remoteTableGraphqlApiExceptionHandler = (error: Error) => {
case RemoteTableExceptionCode.REMOTE_TABLE_ALREADY_EXISTS:
throw new ConflictError(error.message);
default: {
const _exhaustiveCheck: never = error.code;
throw error;
return assertUnreachable(error.code);
}
}
}