Skip to content

error handling #58

Description

@dyfu95

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]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions