Skip to content

Fix error-page for POST,PUT, etc.#1498

Closed
thomasmey wants to merge 4 commits intomitreid-connect:masterfrom
thomasmey:bugfix/error-page
Closed

Fix error-page for POST,PUT, etc.#1498
thomasmey wants to merge 4 commits intomitreid-connect:masterfrom
thomasmey:bugfix/error-page

Conversation

@thomasmey
Copy link
Copy Markdown

the view controller error in authz-config.xml forwards to the resp. JSP,
but the error page only supports GET method.

Install a real error controller that at least logs all error messages
and then forwards to the view controller, so not handled exceptions for
e.g. POST request can actually be found.

the view controller error in authz-config.xml forwards to the resp. JSP,
but the error page only supports GET method.

Install a real error controller that at least logs all error messages
and then forwards to the view controller, so not handled exceptions for
e.g. POST request can actually be found.
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 19, 2019

Codecov Report

Merging #1498 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1498   +/-   ##
=========================================
  Coverage     25.21%   25.21%           
  Complexity      912      912           
=========================================
  Files           209      209           
  Lines         11689    11689           
  Branches       2116     2116           
=========================================
  Hits           2947     2947           
  Misses         8227     8227           
  Partials        515      515

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc6bd4b...e2d1824. Read the comment docs.


<error-page>
<location>/error</location>
<location>/errorController</location>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we still map this to /error?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm not sure this is possbile without breaking things. Some other jsp pages directly redirect/forwards to /error when changing the above "catch all" error location these wont get catch. Or do I misunderstand. Let me ask the otherway around:

  • under what path should the ErrorController be reachable?
  • under what path should the error.jsp be reachable?

another thing that should be done is to move the controller logic from error.jsp in the ErrorController.

Comment thread pom.xml
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any other changes that updating the servlet version would bring to the underlying project?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this gives the static defines like RequestDispatcher.ERROR_MESSAGE as web.xml uses 3.0 syntax already.

@thomasmey thomasmey closed this by deleting the head repository Dec 29, 2025
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.21%. Comparing base (cc6bd4b) to head (e2d1824).
⚠️ Report is 11 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1498   +/-   ##
=========================================
  Coverage     25.21%   25.21%           
  Complexity      912      912           
=========================================
  Files           209      209           
  Lines         11689    11689           
  Branches       2116     2116           
=========================================
  Hits           2947     2947           
  Misses         8227     8227           
  Partials        515      515           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants