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

add debt message code #3724

Merged
merged 1 commit into from Aug 22, 2023
Merged

add debt message code #3724

merged 1 commit into from Aug 22, 2023

Conversation

bxy4543
Copy link
Member

@bxy4543 bxy4543 commented Aug 21, 2023

🤖 Generated by Copilot at 2dace6b

Summary

📦🚨💰

This pull request introduces a common package that defines a standard format and code for error messages in the controllers. It also updates the debt webhook controller to use the common package for the insufficient balance error.

To handle errors with grace
We added a common package
It formats the message
With a code and a text
Like sealos-code[100]: insufficient balance

Walkthrough

  • Define common package and constants for error messages in controllers/pkg/common/common.go (link)
  • Import common package and use its constants and format in checkOption function in controllers/account/api/v1/debt_webhook.go (link, link)

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Aug 21, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 909
✅ Successful 372
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 536
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (2b94328) 66.36% compared to head (df7ed14) 66.36%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3724   +/-   ##
=======================================
  Coverage   66.36%   66.36%           
=======================================
  Files           8        8           
  Lines         654      654           
=======================================
  Hits          434      434           
  Misses        173      173           
  Partials       47       47           

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

@lingdie lingdie merged commit cd47600 into labring:main Aug 22, 2023
42 of 43 checks passed
@bxy4543 bxy4543 deleted the debt-code branch August 22, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants