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

error handling #58

Open
dyfu95 opened this issue Feb 23, 2022 · 0 comments
Open

error handling #58

dyfu95 opened this issue Feb 23, 2022 · 0 comments
Assignees

Comments

@dyfu95
Copy link
Collaborator

dyfu95 commented Feb 23, 2022

Expected Behavior
如果打API時失敗(回傳400)時,要處理這個error,不要一直卡住在loading。

Current Behavior
如果回傳400,會一直卡在loading。

To Reproduce
打api時

Possible Solution
加入setTimeout。

Context (Environment)
目前已經遇到兩隻api會回傳400:
/location : 如果使用者已經回答DB的所有答案時,會無法取得location的五筆資料。
/answer : 如果location_id超過指定範圍(目前是超過50),會無法post資料

Additional context
Add any other context about the problem here.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]
@dyfu95 dyfu95 self-assigned this Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant