attemptLegacyImport should not break the entire request when it fails

This commit is contained in:
41666 2022-02-02 13:52:01 -05:00
parent 140f9d566b
commit c7bfed8bae
2 changed files with 14 additions and 8 deletions

View file

@ -36,6 +36,7 @@ export const forbidden = () => json({ error: 'forbidden' }, { status: 403 });
export const notFound = () => json({ error: 'not found' }, { status: 404 });
export const serverError = (error: Error) => {
console.error(error);
console.trace();
return json({ error: 'internal server error' }, { status: 500 });
};
export const notImplemented = () => json({ error: 'not implemented' }, { status: 501 });