You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently non-ok status codes (like 404) will reject the requests promise, with an error like: failed to execute API: Network Error: Status code 404 Not Found indicates failure (See #2004)
Important information can be contained in non-ok server responses that should be available to the client.
For example response headers could contain rate limiting information, or the body could contain form validation errors.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently non-ok status codes (like 404) will reject the requests promise, with an error like:
failed to execute API: Network Error: Status code 404 Not Found indicates failure
(See #2004)OK requests do resolve, including a status code:
tauri/tooling/api/src/http.ts
Lines 126 to 136 in 034c260
To Reproduce
Expected behavior
Any kind of status code should resolve, and the user should check whether the status code is an OK one.
For example using a helper like https://developer.mozilla.org/en-US/docs/Web/API/Response/ok
Rejection should be used when the request couldn't be completed, for example:
Screenshots
n/a
Platform and Versions (please complete the following information):
tauri = { git = "https://github.com/tauri-apps/tauri", branch = "dev", features = ["api-all", "system-tray"] }
Additional context
Important information can be contained in non-ok server responses that should be available to the client.
For example response headers could contain rate limiting information, or the body could contain form validation errors.
The text was updated successfully, but these errors were encountered: