Skip to content

#526 Provide better exception message if template engine is initialized with wrong content type#529

Merged
casid merged 8 commits intocasid:mainfrom
iTob191:error-message-wrong-content-type
Mar 17, 2026
Merged

#526 Provide better exception message if template engine is initialized with wrong content type#529
casid merged 8 commits intocasid:mainfrom
iTob191:error-message-wrong-content-type

Conversation

@iTob191
Copy link
Copy Markdown
Contributor

@iTob191 iTob191 commented Mar 16, 2026

Follow-up to bafa85d

…ed with ContentType.Plain instead of ContentType.Html and params map is used

Follow-up to bafa85d
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.17%. Comparing base (160f364) to head (145a965).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...runtime/src/main/java/gg/jte/runtime/Template.java 64.28% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #529      +/-   ##
============================================
- Coverage     91.22%   91.17%   -0.05%     
- Complexity     1221     1222       +1     
============================================
  Files            76       76              
  Lines          3178     3183       +5     
  Branches        490      489       -1     
============================================
+ Hits           2899     2902       +3     
- Misses          171      173       +2     
  Partials        108      108              

☔ 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.

Copy link
Copy Markdown
Owner

@casid casid left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, can please check my comments?

Comment thread jte-runtime/src/main/java/gg/jte/runtime/Template.java
Comment thread test/jte-runtime-test/src/test/java/gg/jte/WrongContentTypeTest.java Outdated
Copy link
Copy Markdown
Owner

@casid casid left a comment

Choose a reason for hiding this comment

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

Thanks for the investigation! 👍

Just a little clean-up and then this is good to go.

Comment thread test/jte-runtime-test/src/test/java/gg/jte/WrongContentTypeTest.java Outdated
Comment thread jte-runtime/src/main/java/gg/jte/runtime/Template.java
@iTob191 iTob191 force-pushed the error-message-wrong-content-type branch from 6405b60 to 145a965 Compare March 17, 2026 15:16
@casid casid merged commit 85a738a into casid:main Mar 17, 2026
5 of 6 checks passed
@casid
Copy link
Copy Markdown
Owner

casid commented Mar 17, 2026

Thanks for your submission @iTob191 💯

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.

3 participants