Using SC.get('/resolve') returns an error on Firefox

Open
#90 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
api

Research direction

Start at the SC.get and SC.resolve entry points, comparing their request options and the status-code mapping described in the report. Reproduce SC.get('/resolve', {url: foo}) in Firefox and observe the initial OPTIONS request. Done means the /resolve call completes without the reported promise error.

Written by the indexing model from the issue text.

Description

(Javascript SDK)

When using SC.get('/resolve', {url: foo}) on FIrefox, a first OPTIONS request is sent which causes the initial call to '/resolve' to return an error in the promise.

A workaround I found was to use SC.resolve(URL) directly, which sets _status_code_map: { 302: 200 } in the request's options.

Maybe this option should be there by default on the SC.get() method as well?

ff

Dominant language
JavaScript
Stars
388
Forks
76
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 soundcloud/soundcloud-javascript

All issues in soundcloud/soundcloud-javascript

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.