Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

lsy357
Copy link
Collaborator

@lsy357 lsy357 commented Oct 14, 2025

What type of PR is this?

feat

Check the PR title.

  • This PR title match the format: [<type>][<scope>]: <description>. For example: [fix][backend] flaky fix
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Add documentation if the current PR requires user awareness at the usage level.
  • This PR is written in English. PRs not in English will not be reviewed.

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

@lsy357 lsy357 changed the title feat(backend): errorx StatusError with AffectStability [feat][backend] errorx StatusError with AffectStability Oct 14, 2025
func TestWithExtra(t *testing.T) {
err := errorx.NewByCode(CommonInternalErrorCode)

statusErr, ok := errorx.FromStatusError(err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个是不是能在NewByCode的时候通过Option实现,不然New出来还要这么写,有点繁琐

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

没有加到 new 方法中的原因是这样的:认为影响稳定性是在定义 code 时已经确定的属性,不应该更改;之前智伟你提到的 case 应该是下游抛出来的错误期望设置为不影响稳定性?

Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/pkg/errorx/internal/status.go 50.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #223      +/-   ##
==========================================
- Coverage   64.08%   64.03%   -0.05%     
==========================================
  Files         477      477              
  Lines       51830    51834       +4     
==========================================
- Hits        33214    33191      -23     
- Misses      16286    16315      +29     
+ Partials     2330     2328       -2     
Flag Coverage Δ
unittests 64.03% <50.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
backend/pkg/errorx/error.go 93.54% <ø> (ø)
backend/pkg/errorx/internal/status.go 78.84% <50.00%> (-0.76%) ⬇️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.