fix: Add missing error causes

This commit is contained in:
Joachim Van Herwegen
2023-07-25 14:24:45 +02:00
parent f373dff1d7
commit 7505f07f2f
4 changed files with 9 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ export class N3PatchBodyParser extends BodyParser {
try {
store = new Store(parser.parse(n3));
} catch (error: unknown) {
throw new BadRequestHttpError(`Invalid N3: ${createErrorMessage(error)}`);
throw new BadRequestHttpError(`Invalid N3: ${createErrorMessage(error)}`, { cause: error });
}
// Solid, §5.3.1: "A patch resource MUST contain a triple ?patch rdf:type solid:InsertDeletePatch."