mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Resolve duplicate error message and no trailing newline
* fix: Resolves duplicate error message * test: Add trailing newline on error test
This commit is contained in:
@@ -27,7 +27,9 @@ export class BasicResponseWriter extends ResponseWriter {
|
||||
}
|
||||
input.response.setHeader('content-type', 'text/plain');
|
||||
input.response.writeHead(code);
|
||||
input.response.end(`${input.result.name}: ${input.result.message}\n${input.result.stack}`);
|
||||
input.response.end(typeof input.result.stack === 'string' ?
|
||||
`${input.result.stack}\n` :
|
||||
`${input.result.name}: ${input.result.message}\n`);
|
||||
} else {
|
||||
input.response.setHeader('location', input.result.identifier.path);
|
||||
if (input.result.body) {
|
||||
|
||||
Reference in New Issue
Block a user