Skip to content

Answer 404 for theme data about a theme that doesn't exist - #283

Merged
mraible merged 1 commit into
apache:masterfrom
mraible:themedata-unknown-theme-404
Nov 15, 2026
Merged

mraible merged 1 commit into
apache:masterfrom
mraible:themedata-unknown-theme-404

Conversation

@mraible

@mraible mraible commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

/roller-ui/authoring/themedata?theme=<id> answered 500 ("ERROR fetching theme data") for an id that doesn't exist, because ThemeManager.getTheme() throws ThemeNotFoundException and the servlet treated every WebloggerException the same. It now answers 404 for an unknown theme and still answers 500 for other errors.

  • The endpoint needs a login, and the Theme and Create Weblog pages only ask for themes from their own lists, so users don't see this; it only tidies the response.
  • ThemeDataServletTest adds a case for an unknown id.

Found on a copy of raibledesigns.com while retesting #279 and #282.

ThemeManager.getTheme() throws ThemeNotFoundException for an unknown id, which ThemeDataServlet reported as a 500.
@mraible
mraible marked this pull request as ready for review November 15, 2026 21:19
@mraible
mraible requested a review from snoopdave November 15, 2026 21:19

@snoopdave snoopdave left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🐝

@mraible
mraible merged commit 6a701f4 into apache:master Nov 15, 2026
9 checks passed
@mraible
mraible deleted the themedata-unknown-theme-404 branch November 15, 2026 21:23
@mraible mraible mentioned this pull request Nov 15, 2026
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.

2 participants