Erroring when successful

Open
#243 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
api, backend

Research direction

Start by reproducing the reported behavior with an API call inside a try/catch, comparing a failed request with a 200 response. Inspect how request success and errors are surfaced, and confirm that successful responses do not enter the error path while failed requests do. The issue provides no file or test names, so a reproducible example is needed before implementation.

Written by the indexing model from the issue text.

Description

I'm trying to use this to replace the last bit of jQuery in a wordPress theme and for some reason I can't fathom, when ever i fail a request, it is "successfull" and vice versa. This seems to happen when i use the try catch method and API calls.

I can inspect the requests and see anything with a 200 status code seems to trigger the error for me.

Dominant language
JavaScript
Stars
1.6k
Forks
237
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tomas/needle

All issues in tomas/needle

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.