Skip to content

Commit

Permalink
correct error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ANKUR DWIVEDI authored and ANKUR DWIVEDI committed Apr 21, 2024
1 parent 8eff87d commit 2017262
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/constants/errorMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export default {
help: "",
},
INVALID_UPLOAD_OPTIONS: { message: "Invalid uploadOptions parameter", help: "" },
MISSING_SIGNATURE: { message: "Missing signature for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
MISSING_TOKEN: { message: "Missing token for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
MISSING_EXPIRE: { message: "Missing expire for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
MISSING_SIGNATURE: { message: "Missing signature for upload. The SDK expects token, signature and expire for authentication.", help: ""},
MISSING_TOKEN: { message: "Missing token for upload. The SDK expects token, signature and expire for authentication.", help: ""},
MISSING_EXPIRE: { message: "Missing expire for upload. The SDK expects token, signature and expire for authentication.", help: ""},
INVALID_TRANSFORMATION: { message: "Invalid transformation parameter. Please include at least pre, post, or both.", help: ""},
INVALID_PRE_TRANSFORMATION: { message: "Invalid pre transformation parameter.", help: ""},
INVALID_POST_TRANSFORMATION: { message: "Invalid post transformation parameter.", help: ""},
Expand Down
6 changes: 3 additions & 3 deletions test/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe("File upload", function () {
imagekit.upload(fileOptions, callback);
expect(server.requests.length).to.be.equal(1);
expect(callback.calledOnce).to.be.true;
sinon.assert.calledWith(callback, { message: "Missing token for upload. The SDK expects token, sginature and expire for authentication.", help: "" }, null);
sinon.assert.calledWith(callback, { message: "Missing token for upload. The SDK expects token, signature and expire for authentication.", help: "" }, null);
});

it('Missing signature', function () {
Expand All @@ -149,7 +149,7 @@ describe("File upload", function () {
imagekit.upload(fileOptions, callback);
expect(server.requests.length).to.be.equal(1);
expect(callback.calledOnce).to.be.true;
sinon.assert.calledWith(callback, { message: "Missing signature for upload. The SDK expects token, sginature and expire for authentication.", help: "" }, null);
sinon.assert.calledWith(callback, { message: "Missing signature for upload. The SDK expects token, signature and expire for authentication.", help: "" }, null);
});

it('Missing expire', function () {
Expand All @@ -165,7 +165,7 @@ describe("File upload", function () {
imagekit.upload(fileOptions, callback);
expect(server.requests.length).to.be.equal(1);
expect(callback.calledOnce).to.be.true;
sinon.assert.calledWith(callback, { message: "Missing expire for upload. The SDK expects token, sginature and expire for authentication.", help: "" }, null);
sinon.assert.calledWith(callback, { message: "Missing expire for upload. The SDK expects token, signature and expire for authentication.", help: "" }, null);
});

it('Missing public key', function () {
Expand Down

0 comments on commit 2017262

Please sign in to comment.