chore: use strict compilation mode

This commit is contained in:
tdurieux
2023-02-13 13:38:57 +01:00
parent 3ab9b0c7a4
commit ec6098b3a1
33 changed files with 4007 additions and 2160 deletions

View File

@@ -23,7 +23,11 @@ export default async function (job: SandboxedJob<Repository, void>) {
try {
await repo.anonymize();
} catch (error) {
await repo.updateStatus(RepositoryStatus.ERROR, error.message);
if (error instanceof Error) {
await repo.updateStatus(RepositoryStatus.ERROR, error.message);
} else if (typeof error === "string") {
await repo.updateStatus(RepositoryStatus.ERROR, error);
}
throw error;
}
} catch (error) {

View File

@@ -19,7 +19,11 @@ export default async function (job: SandboxedJob<Repository, void>) {
try {
await repo.remove();
} catch (error) {
await repo.updateStatus(RepositoryStatus.ERROR, error.message);
if (error instanceof Error) {
await repo.updateStatus(RepositoryStatus.ERROR, error.message);
} else if (typeof error === "string") {
await repo.updateStatus(RepositoryStatus.ERROR, error);
}
throw error;
}
} catch (error) {