Closed
Bug 1135582
Opened 10 years ago
Closed 7 years ago
[js client] We should return 'undefined' when the content length is 0 or the content type is not json
Categories
(Taskcluster :: Services, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jhford, Unassigned)
References
Details
When the server sends us an empty repsonse, we should be returning undefined.
Updated•10 years ago
|
Component: TaskCluster → General
Product: Testing → Taskcluster
Updated•9 years ago
|
Component: General → Client Libraries
Comment 1•9 years ago
|
||
Commits pushed to master at https://github.com/taskcluster/taskcluster-client
https://github.com/taskcluster/taskcluster-client/commit/e5a549bbedc769d305f55922ff881e7b071e32a6
Bug 1135582
Return undefined on empty response from server.
modified: lib/client.js
https://github.com/taskcluster/taskcluster-client/commit/1331e9fb12b6eca46c26dea8a5c9e7bd3173d031
Bug 1135582
Return undefined on empty response from server
Returns undefined if response is empty or content-type is not
application/json
modified: lib/client.js
https://github.com/taskcluster/taskcluster-client/commit/4ed666af1cc7df94ec77d4c020c3f19c15f1e3ab
Merge pull request #46 from ckousik/undef
Bug 1135582
Comment 2•9 years ago
|
||
This will be released with the next version... Thanks for the fix! :)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 3•9 years ago
|
||
This doesn't return undefined -- it raises an exception. Which is not what we want, as we have lots of API methods that don't return a body or res['content-type']. With this change, we're getting `res.headers['content-type'] is null`. This has left the tools UI pretty broken.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 4•9 years ago
|
||
Commit pushed to master at https://github.com/taskcluster/taskcluster-tools
https://github.com/taskcluster/taskcluster-tools/commit/300bb87ce7a005fd864c1237fcf363003d0214e7
Bug 1135582: pin taskcluster-client to a working version
Comment 5•9 years ago
|
||
I've pinned tools to use 2.23.13.
https://github.com/taskcluster/taskcluster-client/pull/48
Updated•7 years ago
|
Status: REOPENED → RESOLVED
Closed: 9 years ago → 7 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•6 years ago
|
Component: Client Libraries → Services
You need to log in
before you can comment on or make changes to this bug.
Description
•