Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

401 requests still has mis-typed variable and missing variable #75

@elijahdorman

Description

@elijahdorman

https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit/blob/master/forcetk.js#L273

forcetk.Client.prototype.blob = function(path, fields, filename, payloadField, payload, callback, error, retry) {

https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit/blob/master/forcetk.js#L315

that.blob(path, fields, filename, file, callback, error, true);

When a 401 occurs, it throws because file doesn't exist. If file happens to exist in another scope, then it passes the callback to the server (as data). Even worse, because true is passed as the error variable, it can continue infinitely because retry will always be undefined.

This kind of issue CANNOT occur if builds are being linted before distribution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions