Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions certification/runner/debug.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Debug from 'debug';
import debug from 'debug';

if (!('DEBUG' in process.env)) {
process.env.DEBUG = 'runner';
}

export default new Debug('runner');
export default debug('runner');
10 changes: 5 additions & 5 deletions lib/shared/authorization_error_handler.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Debug from 'debug';
import debug from 'debug';

import { InvalidRedirectUri } from '../helpers/errors.js';
import instance from '../helpers/weak_cache.js';
import errOut from '../helpers/err_out.js';
import resolveResponseMode from '../helpers/resolve_response_mode.js';
import oneRedirectUriClients from '../actions/authorization/one_redirect_uri_clients.js';

const debug = new Debug('oidc-provider:authentication:error');
const serverError = new Debug('oidc-provider:server_error');
const serverErrorTrace = new Debug('oidc-provider:server_error:trace');
const debugError = debug('oidc-provider:authentication:error');
const serverError = debug('oidc-provider:server_error');
const serverErrorTrace = debug('oidc-provider:server_error:trace');

export default (provider) => {
const AD_ACTA_CHECKS = Object.entries({
Expand All @@ -25,7 +25,7 @@ export default (provider) => {

if (err.expose) {
provider.emit('authorization.error', ctx, err);
debug('%o', out);
debugError('%o', out);
} else {
provider.emit('server_error', ctx, err);
serverError('path=%s method=%s error=%o', ctx.path, ctx.method, err);
Expand Down
10 changes: 5 additions & 5 deletions lib/shared/error_handler.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as crypto from 'node:crypto';

import Debug from 'debug';
import debug from 'debug';

import instance from '../helpers/weak_cache.js';
import * as formHtml from '../helpers/user_code_form.js';
import { ReRenderError } from '../helpers/re_render_errors.js';
import errOut from '../helpers/err_out.js';

const debug = new Debug('oidc-provider:error');
const serverError = new Debug('oidc-provider:server_error');
const serverErrorTrace = new Debug('oidc-provider:server_error:trace');
const debugError = debug('oidc-provider:error');
const serverError = debug('oidc-provider:server_error');
const serverErrorTrace = debug('oidc-provider:server_error:trace');

const userInputRoutes = new Set(['code_verification', 'device_resume']);

Expand All @@ -26,7 +26,7 @@ export default function getErrorHandler(provider, eventName) {
ctx.status = err.statusCode || 500;

if (err.expose && !(err instanceof ReRenderError)) {
debug('path=%s method=%s error=%o detail=%s', ctx.path, ctx.method, out, err.error_detail);
debugError('path=%s method=%s error=%o detail=%s', ctx.path, ctx.method, out, err.error_detail);
} else if (!(err instanceof ReRenderError)) {
serverError('path=%s method=%s error=%o', ctx.path, ctx.method, err);
serverErrorTrace(err);
Expand Down