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

perf: improve more friendly exception messages #113

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

longjuan
Copy link
Member

友好地提示异常信息

fixes #105

验证方法:

  1. ak/sk乱输,发生接收到403状态码(接收错误状态码)
  2. endpoint网址改成不存在的,如.com改成.comaaa(未知主机)
  3. endpoint端口改成没监听的(超时)

@f2c-ci-robot f2c-ci-robot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jan 10, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from ruibaby and wan92hen January 10, 2024 15:19
@longjuan
Copy link
Member Author

/ping @halo-dev/sig-halo

Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

Hi @longjuan , 我留下了一下评论,有时间可以看看。

src/main/java/run/halo/s3os/S3ExceptionHandler.java Outdated Show resolved Hide resolved
@@ -1,5 +1,13 @@
package run.halo.s3os;

import static run.halo.s3os.S3OsAttachmentHandler.OBJECT_KEY;
Copy link
Member

Choose a reason for hiding this comment

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

这些 import 修改似乎不是预期的。建议统一一下代码格式化规则。例如提供 .editorconfig 文件。

Copy link
Member Author

Choose a reason for hiding this comment

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

我现在用的是 https://github.com/halo-dev/halo/blob/main/config/checkstyle/checkstyle.xml 的配置文件,之前可能是用远程开发平台没用上配置文件,导致导入顺序不对。

src/main/java/run/halo/s3os/S3ExceptionHandler.java Outdated Show resolved Hide resolved
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/approve

@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 Jan 16, 2024
Copy link
Member

@ruibaby ruibaby 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 Jan 16, 2024
Copy link

f2c-ci-robot bot commented Jan 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, ruibaby

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

@JohnNiang JohnNiang added the kind/improvement Categorizes issue or PR as related to a improvement. label Jan 16, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit 8ff4acb into halo-dev:main Jan 16, 2024
4 checks passed
@longjuan longjuan deleted the perf/error-message branch March 1, 2024 12:04
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. 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.

优化错误提示
4 participants