-
Notifications
You must be signed in to change notification settings - Fork 0
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
Scrum 189 fix error of not showing trigger webhook api #49
Scrum 189 fix error of not showing trigger webhook api #49
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
也是小好奇 failed to create webhook url 的情境有什麼 |
src/app/ui/create-webhook-form.tsx
Outdated
if ( | ||
response.status === "error" && | ||
response.errors && | ||
response.message === "Validation failed" | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
小疑問為什麼有這麼多條件
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @poyang1024 ,這邊的話是為了確保情況是我們要的,但確實有可改進之處, 明天會再修正感謝
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chungchihhan ,
其實如果合理且是為了完全吻合使用者情境的話是可以這樣寫拉,不過可能就要讓開發者都 sync 一下後端會有多少的 status,errors,message
src/app/ui/create-webhook-form.tsx
Outdated
// for api error checked | ||
if ( | ||
response.status === "error" && | ||
response.message === "Failed to create webhook. Please try again." | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
小疑問為什麼有這麼多條件(同上)
Hi @poyang1024 , 上述判斷式已經優化修正,感謝 |
Description
因為POST /webhook 這隻 API Request Body有所變更,多了必填的
webhook_type
,因此導致前端無法正常使用,另外加上error的toast來告知 api 出現問題Type of Change
Related Issues
SCRUM-189
Testing
Screenshots/Videos
創建成功:
成功複製url :
api回傳error或者有必填沒有填寫
(e.g. 如果前端發送的request body缺乏
webhook_type
,webhook_type
是必填,因此api response的status會是error
. )Checklist
Additional Notes