[#14312] Add more developer friendly schema validation error#14313
Open
TobyCyan wants to merge 18 commits into
Open
[#14312] Add more developer friendly schema validation error#14313TobyCyan wants to merge 18 commits into
TobyCyan wants to merge 18 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dev-server startup error handling layer to surface developer-friendly, actionable messages (currently focused on Hibernate schema validation failures) while integrating into the Jetty startup path.
Changes:
- Introduces
StartupErrorHandler+ factory/dispatcher to detect known startup exceptions and format guidance (e.g.,./gradlew liquibaseUpdate). - Adds a
SchemaValidationStartupErrorHandlerto recognize schema validation failures and build a structured message. - Wraps Jetty
server.start()inApplicationto intercept startup failures and throw a dev-friendly exception; adds component tests for the new behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/teammates/main/Application.java | Catches Jetty startup exceptions and routes them through the new dev startup error handler. |
| src/main/java/teammates/ui/errorhandlers/StartupErrorHandler.java | Defines the contract for formatting startup errors into dev-friendly messages. |
| src/main/java/teammates/ui/errorhandlers/SchemaValidationStartupErrorHandler.java | Implements schema-validation failure detection and message formatting. |
| src/main/java/teammates/ui/errorhandlers/DevServerStartupErrorHandlerFactory.java | Maps startup exceptions to the first matching handler (via reflection). |
| src/main/java/teammates/ui/errorhandlers/DevServerStartupErrorHandler.java | Throws a dev-friendly exception when a handler matches. |
| src/main/java/teammates/ui/errorhandlers/package-info.java | Adds package-level documentation for startup error handlers. |
| src/main/java/teammates/ui/exception/DevServerStartupException.java | Adds a dedicated runtime exception type for dev-server startup failures. |
| src/test/resources/testng-component.xml | Includes the new UI startup error handler tests in component test suite. |
| src/test/java/teammates/ui/devserverstartuperrorhandlers/* | Adds tests for handler detection, factory selection, and formatted message output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Part of #14312
Outline of Solution