mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Correctly render internal IDP errors
This commit is contained in:
@@ -84,6 +84,8 @@ export class IdentityProviderFactory {
|
||||
},
|
||||
renderError:
|
||||
async(ctx: KoaContextWithOIDC, out: ErrorOut, error: Error): Promise<void> => {
|
||||
// This allows us to stream directly to to the response object, see https://github.com/koajs/koa/issues/944
|
||||
ctx.respond = false;
|
||||
const preferences: RepresentationPreferences = { type: { 'text/plain': 1 }};
|
||||
const result = await this.errorHandler.handleSafe({ error, preferences });
|
||||
await this.responseWriter.handleSafe({ response: ctx.res, result });
|
||||
|
||||
Reference in New Issue
Block a user