Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,20 @@ app.listen(3035, async () => {
);
console.log("The Change Request team has been created");
} catch (err: any) {
if (
if (err.data === undefined) {
// terminusdb has not yet started up. exit.
console.error("TerminusDB not yet initialized");
process.exit(1);
} else if (
typeof err.data === "object" &&
err.data["api:error"] &&
err.data["api:error"]["@type"] === "api:NoUniqueIdForOrganizationName"
) {
console.log("The Change Request team already exists");
} else {
console.log("An unexpected error occured during startup");
console.log(err);
process.exit(1);
}
}
});
Expand Down