files.com 1.2.287 → 1.2.288
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/_VERSION +1 -1
- package/docs/Errors.md +0 -1
- package/lib/Errors.js +301 -313
- package/lib/Files.js +1 -1
- package/package.json +1 -1
- package/src/Errors.js +0 -1
- package/src/Files.js +1 -1
- package/test/Api.test.js +8 -8
package/lib/Files.js
CHANGED
|
@@ -12,7 +12,7 @@ var apiKey;
|
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
14
|
var language = null;
|
|
15
|
-
var version = '1.2.
|
|
15
|
+
var version = '1.2.288';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
package/package.json
CHANGED
package/src/Errors.js
CHANGED
|
@@ -203,7 +203,6 @@ export class NotFound_BundleRegistrationNotFoundError extends NotFoundError { co
|
|
|
203
203
|
export class NotFound_CodeNotFoundError extends NotFoundError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotFound_CodeNotFoundError' } } errorClasses.NotFound_CodeNotFoundError = NotFound_CodeNotFoundError
|
|
204
204
|
export class NotFound_FileNotFoundError extends NotFoundError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotFound_FileNotFoundError' } } errorClasses.NotFound_FileNotFoundError = NotFound_FileNotFoundError
|
|
205
205
|
export class NotFound_FileUploadNotFoundError extends NotFoundError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotFound_FileUploadNotFoundError' } } errorClasses.NotFound_FileUploadNotFoundError = NotFound_FileUploadNotFoundError
|
|
206
|
-
export class NotFound_FolderNotFoundError extends NotFoundError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotFound_FolderNotFoundError' } } errorClasses.NotFound_FolderNotFoundError = NotFound_FolderNotFoundError
|
|
207
206
|
export class NotFound_GroupNotFoundError extends NotFoundError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotFound_GroupNotFoundError' } } errorClasses.NotFound_GroupNotFoundError = NotFound_GroupNotFoundError
|
|
208
207
|
export class NotFound_InboxNotFoundError extends NotFoundError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotFound_InboxNotFoundError' } } errorClasses.NotFound_InboxNotFoundError = NotFound_InboxNotFoundError
|
|
209
208
|
export class NotFound_NestedNotFoundError extends NotFoundError { constructor(message, code, errorData) { super(message, code, errorData); this.name = 'NotFound_NestedNotFoundError' } } errorClasses.NotFound_NestedNotFoundError = NotFound_NestedNotFoundError
|
package/src/Files.js
CHANGED
package/test/Api.test.js
CHANGED
|
@@ -3,7 +3,7 @@ import nock from 'nock'
|
|
|
3
3
|
import {
|
|
4
4
|
FilesError,
|
|
5
5
|
NotAuthenticated_LockoutRegionMismatchError,
|
|
6
|
-
|
|
6
|
+
NotFoundError,
|
|
7
7
|
} from '../lib/Errors'
|
|
8
8
|
import Files from '../lib/Files'
|
|
9
9
|
import ApiKey from '../lib/models/ApiKey'
|
|
@@ -99,10 +99,10 @@ describe('API client', () => {
|
|
|
99
99
|
.get('/api/rest/v1/folders/missing')
|
|
100
100
|
.query(true)
|
|
101
101
|
.reply(404, {
|
|
102
|
-
error: '
|
|
102
|
+
error: 'Not Found. This may be related to your permissions.',
|
|
103
103
|
'http-code': 404,
|
|
104
|
-
title: '
|
|
105
|
-
type: 'not-found
|
|
104
|
+
title: 'Not Found',
|
|
105
|
+
type: 'not-found',
|
|
106
106
|
})
|
|
107
107
|
|
|
108
108
|
return Folder.listFor('missing')
|
|
@@ -110,11 +110,11 @@ describe('API client', () => {
|
|
|
110
110
|
throw new Error('Missing folder did not throw an error')
|
|
111
111
|
})
|
|
112
112
|
.catch(error => {
|
|
113
|
-
expect(error).toBeInstanceOf(
|
|
114
|
-
expect(error.error).toBe('
|
|
113
|
+
expect(error).toBeInstanceOf(NotFoundError)
|
|
114
|
+
expect(error.error).toBe('Not Found. This may be related to your permissions.')
|
|
115
115
|
expect(error.httpCode).toBe(404)
|
|
116
|
-
expect(error.title).toBe('
|
|
117
|
-
expect(error.type).toBe('not-found
|
|
116
|
+
expect(error.title).toBe('Not Found')
|
|
117
|
+
expect(error.type).toBe('not-found')
|
|
118
118
|
})
|
|
119
119
|
})
|
|
120
120
|
|