Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respond not found if no theme template found #6511

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

JohnNiang
Copy link
Member

What type of PR is this?

/kind improvement
/area core
/milestone 2.19.0

What this PR does / why we need it:

This PR refactors "Template Not Found Exception" into "NotFoundException" to prevent too many exception stacktraces in logs file.

Which issue(s) this PR fixes:

Fixes #6501

Special notes for your reviewer:

  1. Activate default theme
  2. Request http://localhost:8090/categories
  3. See the result

Does this PR introduce a user-facing change?

优化当主题模板找不到的异常提示

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 25, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.19.0 milestone Aug 25, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Aug 25, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and wan92hen August 25, 2024 14:58
Copy link

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 73.52941% with 9 lines in your changes missing coverage. Please review.

Project coverage is 58.37%. Comparing base (6cd8dc8) to head (e6a5a01).
Report is 14 commits behind head on main.

Files Patch % Lines
...main/java/run/halo/app/theme/HaloViewResolver.java 40.00% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6511      +/-   ##
============================================
+ Coverage     58.18%   58.37%   +0.18%     
- Complexity     3774     3790      +16     
============================================
  Files           651      652       +1     
  Lines         22125    22161      +36     
  Branches       1538     1539       +1     
============================================
+ Hits          12873    12936      +63     
+ Misses         8641     8613      -28     
- Partials        611      612       +1     

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

Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2024
Copy link

f2c-ci-robot bot commented Aug 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 26, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit 50adc29 into halo-dev:main Aug 26, 2024
7 checks passed
@JohnNiang JohnNiang deleted the refactor/template-not-found branch August 26, 2024 04:30
f2c-ci-robot bot pushed a commit that referenced this pull request Aug 26, 2024
…grading Spring Boot 3.3.3 (#6515)

#### What type of PR is this?

/kind bug
/area core
/milestone 2.19.0

#### What this PR does / why we need it:

After merging #6512 and #6511, unit tests fail due to the changes of <spring-projects/spring-boot@05b73ce>.

This PR fixes the problem by letting `run.halo.app.infra.exception.handlers.ProblemDetailErrorAttributes` extend  `org.springframework.boot.web.reactive.error.DefaultErrorAttributes`.

#### Does this PR introduce a user-facing change?

```release-note
None
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

建议忽略掉主题模板找不到的异常
2 participants