We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
title
message
title 為 Snake Case、Uppercase 的命名,例如 "AUTH_WRONG_PASSWORD", "AUTH_USER_NOT_FOUND" message 為開發者留下的錯誤訊息,例如錯誤的原因
"AUTH_WRONG_PASSWORD"
"AUTH_USER_NOT_FOUND"
前端再根據 title 去拋出對應的顯示文字給 end user 看
目前的 Response (#/components/schemas/Response) 同時有 data 與 err,實際上應該成功的時候才有 data、失敗時才有 err?
{ "success": true, "data": "string", "err": { "title": "string", "message": "string" }, "token": "string" }
例如
200 登入成功
{ "success": true, "data": { "token": "string" } }
401 登入失敗
{ "success": false, "err": { "title": "AUTH_WRONG_PASSWORD", "message": "Provided password is incorrect." } }
token
續簽的 token 是否放在 data 內就可以了?
The text was updated successfully, but these errors were encountered:
待後端確認完每個 endpoint 所有可能的 error 後再更新
Sorry, something went wrong.
uier
No branches or pull requests
需要定義 Error Response 的
title
&message
title
為 Snake Case、Uppercase 的命名,例如"AUTH_WRONG_PASSWORD"
,"AUTH_USER_NOT_FOUND"
message
為開發者留下的錯誤訊息,例如錯誤的原因前端再根據
title
去拋出對應的顯示文字給 end user 看Response
目前的 Response (#/components/schemas/Response) 同時有 data 與 err,實際上應該成功的時候才有 data、失敗時才有 err?
例如
200 登入成功
401 登入失敗
additional
token
property續簽的 token 是否放在 data 內就可以了?
The text was updated successfully, but these errors were encountered: