Add debug_message display to self-test results (PP-3841)#202
Merged
jonathangreen merged 3 commits intomainfrom Mar 6, 2026
Merged
Add debug_message display to self-test results (PP-3841)#202jonathangreen merged 3 commits intomainfrom
jonathangreen merged 3 commits intomainfrom
Conversation
Show the exception's debug_message below the exception description when a self-test fails, giving operators more diagnostic context.
- Make debug_message optional in SelfTestsException interface to match API reality - Use SCSS color variables ($gray-tint, $gray-border) instead of raw rgba() values - Add "debug:" label prefix for operator scannability - Separate debug_message assertions into their own focused test - Add test case for debug_message field completely absent (not just empty string)
jonathangreen
commented
Mar 6, 2026
|
|
||
| import * as React from "react"; | ||
| import { shallow, mount } from "enzyme"; | ||
| import { mount } from "enzyme"; |
Member
Author
There was a problem hiding this comment.
This is unrelated, but flagged by the linter since I modified this file.
| export default class SelfTestResult extends React.Component< | ||
| SelfTestResultProps, | ||
| {} | ||
| Record<string, never> |
Member
Author
There was a problem hiding this comment.
This is unrelated, but flagged by the linter since I modified this file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Display the
debug_messagefield from self-test exceptions in theSelfTestResultcomponent. When a self-test fails and the exception includes adebug_message, it is now shown below the exception message in a visually distinct block.This was previously being sent from the backend, but not being displayed. The debug message contains helpful details, so I think it will be helpful to display.
Changes:
debug_messageoptional inSelfTestsExceptioninterface to match API realitydebug_messagebelow exception messages when present and non-empty.debug-descriptionblock withpre-linewhitespace handling for multi-line debug outputMotivation and Context
I added network diagnostic self-tests for ILS integrations that include detailed debug messages in exception responses. I didn't realize until I tested them that we weren't displaying the
debug_messagedata in the admin UI.Backend PR: ThePalaceProject/circulation#3114
How Has This Been Tested?
npm run test-file-ts src/components/__tests__/SelfTestResult-test.tsx)Checklist: