Skip to content

Improve error message of fetch when xhr.onerror occurs - #3003

Merged
enchev merged 4 commits into
NativeScript:masterfrom
adamvoss:vossad01/fetchErrorMessage
Nov 7, 2016
Merged

enchev merged 4 commits into
NativeScript:masterfrom
adamvoss:vossad01/fetchErrorMessage

Conversation

@adamvoss

@adamvoss adamvoss commented Nov 2, 2016

Copy link
Copy Markdown
Contributor

The commit message references a specific issue in this repo

Fixes/Implements #2952.

You have unit tests

Added one test to cover this case. Since I do not know what the error message will be on iOS, a pattern was used rather than checking for an exact message.

Additionally some cleanup of the existing tests was done to improve correctness of the tests. Some would timeout, rather than fail, swallowing the failure message.

@ns-bot

ns-bot commented Nov 2, 2016

Copy link
Copy Markdown

Can one of the admins verify this patch?

@ns-bot ns-bot added the cla: yes label Nov 2, 2016
@adamvoss adamvoss changed the title Improve error message of fetch when xhr.onerror is occurs Improve error message of fetch when xhr.onerror occurs Nov 2, 2016
@enchev

enchev commented Nov 7, 2016

Copy link
Copy Markdown
Contributor

run ci

@enchev
enchev merged commit 06c04c4 into NativeScript:master Nov 7, 2016
enchev pushed a commit that referenced this pull request Nov 7, 2016
* Ensure fetch-tests fail (instead of timeout) on failure

* Standardize failure handling in fetch-tests

* Improve flawed failure condition of test_fetch_json

Previously, the assertion was always true

* Implement better error message for for xhr.onerror within fetch
@lock

lock Bot commented Aug 28, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants