Skip to content

Commit 2017262

Browse files
ANKUR DWIVEDIANKUR DWIVEDI
authored andcommitted
correct error message
1 parent 8eff87d commit 2017262

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/constants/errorMessages.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export default {
1515
help: "",
1616
},
1717
INVALID_UPLOAD_OPTIONS: { message: "Invalid uploadOptions parameter", help: "" },
18-
MISSING_SIGNATURE: { message: "Missing signature for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
19-
MISSING_TOKEN: { message: "Missing token for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
20-
MISSING_EXPIRE: { message: "Missing expire for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
18+
MISSING_SIGNATURE: { message: "Missing signature for upload. The SDK expects token, signature and expire for authentication.", help: ""},
19+
MISSING_TOKEN: { message: "Missing token for upload. The SDK expects token, signature and expire for authentication.", help: ""},
20+
MISSING_EXPIRE: { message: "Missing expire for upload. The SDK expects token, signature and expire for authentication.", help: ""},
2121
INVALID_TRANSFORMATION: { message: "Invalid transformation parameter. Please include at least pre, post, or both.", help: ""},
2222
INVALID_PRE_TRANSFORMATION: { message: "Invalid pre transformation parameter.", help: ""},
2323
INVALID_POST_TRANSFORMATION: { message: "Invalid post transformation parameter.", help: ""},

test/upload.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describe("File upload", function () {
133133
imagekit.upload(fileOptions, callback);
134134
expect(server.requests.length).to.be.equal(1);
135135
expect(callback.calledOnce).to.be.true;
136-
sinon.assert.calledWith(callback, { message: "Missing token for upload. The SDK expects token, sginature and expire for authentication.", help: "" }, null);
136+
sinon.assert.calledWith(callback, { message: "Missing token for upload. The SDK expects token, signature and expire for authentication.", help: "" }, null);
137137
});
138138

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

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

171171
it('Missing public key', function () {

0 commit comments

Comments
 (0)