-
Notifications
You must be signed in to change notification settings - Fork 95
Error logging improvement. #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
10fa2c8
to
9413deb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements unified error handling for the OpenID Connect module with improved logging capabilities and debugging support. The changes introduce error reference IDs, JSON log formatting, and optional stack trace output.
Key changes:
- Added unified
oidcError()
function for consistent error handling with reference IDs - Converted error handling from simple logging to structured error throwing with try-catch blocks
- Added configurable JSON log format and debug mode with stack traces
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
openid_connect.server_conf | Added commented debug configuration variable |
openid_connect.js | Complete error handling refactor with new unified error function and structured exception handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
9413deb
to
fd22fa9
Compare
- Implemented unified function for error handling. - Each error is assigned its own identifier, generated by using the first 8 chars of the $request_id variable. - Added support for JSON log output. This is controlled by the $oidc_log_format variable, which must be set to 'json'. - Added support for stack trace output. This is enabled by the $oidc_debug variable, which must have any non-empty value. If this variable is defined, the $internal_error_message variable is overwritten with the text of the last error and returned to the User Agent - so use this only for debugging!
fd22fa9
to
db3282f
Compare
$oidc_log_format
variable, which must be set to 'json'.$oidc_debug variable
, which must have any non-empty value. If this variable is defined, the $internal_error_message variable is overwritten with the text of the last error and returned to the User Agent - so use this only for debugging!Fixes issue #113
Example: