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

feat(connector): connector error handler, throw errmsg on general errors #1458

Merged
merged 10 commits into from
Jul 8, 2022

Conversation

darcyYe
Copy link
Contributor

@darcyYe darcyYe commented Jul 7, 2022

Summary

Update connector error handler, throw error description on General errors.

Testing

UTs and tested locally.

@linear
Copy link

linear bot commented Jul 7, 2022

LOG-3239 Connector Error Exposure

对于有些配置上的错误,需要暴露具体信息 (error_code, error_description)。

不能放在 RequestError.data 里。可以是定义一个特殊的错误码或者类型,让外部特殊处理。

@github-actions
Copy link

github-actions bot commented Jul 7, 2022

COMPARE TO master

Total Size Diff 📈 +3.39 KB

Diff by File
Name Diff
packages/connector-alipay-native/src/constant.ts 📈 +114 Bytes
packages/connector-alipay-native/src/index.test.ts 📈 +136 Bytes
packages/connector-alipay-native/src/index.ts 📈 +190 Bytes
packages/connector-alipay-native/src/types.ts 📈 +48 Bytes
packages/connector-alipay/src/constant.ts 📈 +114 Bytes
packages/connector-alipay/src/index.test.ts 📈 +144 Bytes
packages/connector-alipay/src/index.ts 📈 +257 Bytes
packages/connector-alipay/src/types.ts 📈 +38 Bytes
packages/connector-aliyun-dm/src/index.ts 📈 +303 Bytes
packages/connector-aliyun-dm/src/types.ts 📈 +36 Bytes
packages/connector-aliyun-sms/src/index.ts 📈 +363 Bytes
packages/connector-facebook/src/index.test.ts 📈 +17 Bytes
packages/connector-facebook/src/index.ts 📈 +263 Bytes
packages/connector-github/src/index.ts 📈 +195 Bytes
packages/connector-google/src/index.ts 📈 +167 Bytes
packages/connector-twilio-sms/src/types.ts 📈 +80 Bytes
packages/connector-wechat-native/src/constant.ts 📈 +272 Bytes
packages/connector-wechat-native/src/index.test.ts 📈 +258 Bytes
packages/connector-wechat-native/src/index.ts 📈 +147 Bytes
packages/connector-wechat/src/constant.ts 📈 +272 Bytes
packages/connector-wechat/src/index.test.ts 📈 +258 Bytes
packages/connector-wechat/src/index.ts 📈 +148 Bytes
packages/core/src/middleware/koa-connector-error-handler.test.ts 📈 +613 Bytes
packages/core/src/middleware/koa-connector-error-handler.ts 📈 +332 Bytes
packages/phrases/src/locales/en.ts 📈 +20 Bytes
packages/phrases/src/locales/zh-cn.ts 📈 +20 Bytes

Copy link
Member

@gao-sun gao-sun left a comment

Choose a reason for hiding this comment

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

let's paste the screenshot next time if the code itself cannot show the result clearly

packages/connector-alipay/src/index.ts Outdated Show resolved Hide resolved
@gao-sun
Copy link
Member

gao-sun commented Jul 7, 2022

also, remember to use squash merge :-)

@darcyYe darcyYe force-pushed the yemq-log-3239-expose-connector-error branch from eff132a to 3df948c Compare July 8, 2022 04:41
Copy link
Member

@gao-sun gao-sun left a comment

Choose a reason for hiding this comment

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

looks good to me. but @wangsijie would have more context. better to have another stamp

packages/connector-alipay-native/src/index.ts Outdated Show resolved Hide resolved
@gao-sun gao-sun changed the title feat(connector): connector error handler, throw errmsg on General errors feat(connector): connector error handler, throw errmsg on general errors Jul 8, 2022
@darcyYe darcyYe force-pushed the yemq-log-3239-expose-connector-error branch from 3decf09 to ba3e3aa Compare July 8, 2022 12:02
@darcyYe darcyYe merged commit 7da1de3 into master Jul 8, 2022
@darcyYe darcyYe deleted the yemq-log-3239-expose-connector-error branch July 8, 2022 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants