mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-14 19:32:45 +00:00
chore: use strict compilation mode
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user