-
Notifications
You must be signed in to change notification settings - Fork 25
/
errors.js
211 lines (188 loc) · 4.19 KB
/
errors.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
'use strict'
/**
* The konnector could not login
*
* @type {string}
*/
const LOGIN_FAILED = 'LOGIN_FAILED'
/**
* The folder specified as folder_to_save does not exist (checked by BaseKonnector)
*
* @type {string}
*/
const NOT_EXISTING_DIRECTORY = 'NOT_EXISTING_DIRECTORY'
/**
* The vendor's website is down
*
* @type {string}
*/
const VENDOR_DOWN = 'VENDOR_DOWN'
/**
* There was an unexpected error, please take a look at the logs to know what happened
*
* @type {string}
*/
const USER_ACTION_NEEDED = 'USER_ACTION_NEEDED'
/**
* There was a problem while downloading a file
*
* @type {string}
*/
const FILE_DOWNLOAD_FAILED = 'FILE_DOWNLOAD_FAILED'
/**
* There was a problem while saving a file
*
* @type {string}
*/
const SAVE_FILE_FAILED = 'SAVE_FILE_FAILED'
/**
* Could not save a file to the cozy because of disk quota exceeded
*
* @type {string}
*/
const DISK_QUOTA_EXCEEDED = 'DISK_QUOTA_EXCEEDED'
/**
* It seems that the website requires a second authentification factor that we don’t support yet.
*
* @type {string}
*/
const CHALLENGE_ASKED = 'CHALLENGE_ASKED'
/**
* Temporarily blocked
*
* @type {string}
*/
const LOGIN_FAILED_TOO_MANY_ATTEMPTS = 'LOGIN_FAILED.TOO_MANY_ATTEMPTS'
/**
* Access refresh required
*
* @type {string}
*/
const USER_ACTION_NEEDED_OAUTH_OUTDATED = 'USER_ACTION_NEEDED.OAUTH_OUTDATED'
/**
* Unavailable account
*
* @type {string}
*/
const USER_ACTION_NEEDED_ACCOUNT_REMOVED = 'USER_ACTION_NEEDED.ACCOUNT_REMOVED'
/**
* Unavailable account
*
* @type {string}
*/
const USER_ACTION_NEEDED_CHANGE_PASSWORD = 'USER_ACTION_NEEDED.CHANGE_PASSWORD'
/**
* Password update required
*
* @type {string}
*/
const USER_ACTION_NEEDED_PERMISSIONS_CHANGED =
'USER_ACTION_NEEDED.PERMISSIONS_CHANGED'
/**
* The user needs to accept a CGU form before accessing the rest of the website
*
* @type {string}
*/
const USER_ACTION_NEEDED_CGU_FORM = 'USER_ACTION_NEEDED.CGU_FORM'
/**
* solveCaptcha failed to solve the captcha
*
* @type {string}
*/
const CAPTCHA_RESOLUTION_FAILED = 'CAPTCHA_RESOLUTION_FAILED'
/**
* Additionnal information is needed to check your login details
*
* @type {string}
*/
const LOGIN_FAILED_NEEDS_SECRET = 'LOGIN_FAILED.NEEDS_SECRET'
/**
* remote website seems to be unavailable
*
* @type {string}
*/
const MAINTENANCE = 'MAINTENANCE'
/**
* User needs to accept new terms
*
* @type {string}
*/
const TERMS_VERSION_MISMATCH = 'TERMS_VERSION_MISMATCH'
/**
* unkown error
*
* @type {string}
*/
const UNKNOWN_ERROR = 'UNKNOWN_ERROR'
/**
* The synchronization is complete but some elements may be missing
*
* @type {string}
*/
const UNKNOWN_ERROR_PARTIAL_SYNC = 'UNKNOWN_ERROR.PARTIAL_SYNC'
/**
* Renewal of authentication required
*
* @type {string}
*/
const USER_ACTION_NEEDED_SCA_REQUIRED = 'USER_ACTION_NEEDED.SCA_REQUIRED'
/**
* Authentication renewal required
*
* @type {string}
*/
const USER_ACTION_NEEDED_TWOFA_EXPIRED = 'USER_ACTION_NEEDED.TWOFA_EXPIRED'
/**
* Authentication on vendor website required
*
* @type {string}
*/
const USER_ACTION_NEEDED_WEBAUTH_REQUIRED =
'USER_ACTION_NEEDED.WEBAUTH_REQUIRED'
/**
* Incorrect strong authentication code
*
* @type {string}
*/
const USER_ACTION_NEEDED_WRONG_TWOFA_CODE =
'USER_ACTION_NEEDED.WRONG_TWOFA_CODE'
/**
* Unavailable bank website
*
* @type {string}
*/
const VENDOR_DOWN_BANK_DOWN = 'VENDOR_DOWN.BANK_DOWN'
/**
* Unavailable bank website
*
* @type {string}
*/
const VENDOR_DOWN_LINXO_DOWN = 'VENDOR_DOWN.LINXO_DOWN'
module.exports = {
LOGIN_FAILED,
LOGIN_FAILED_NEEDS_SECRET,
LOGIN_FAILED_TOO_MANY_ATTEMPTS,
NOT_EXISTING_DIRECTORY,
FILE_DOWNLOAD_FAILED,
SAVE_FILE_FAILED,
DISK_QUOTA_EXCEEDED,
CHALLENGE_ASKED,
USER_ACTION_NEEDED,
USER_ACTION_NEEDED_OAUTH_OUTDATED,
USER_ACTION_NEEDED_ACCOUNT_REMOVED,
USER_ACTION_NEEDED_CHANGE_PASSWORD,
USER_ACTION_NEEDED_PERMISSIONS_CHANGED,
USER_ACTION_NEEDED_CGU_FORM,
USER_ACTION_NEEDED_SCA_REQUIRED,
USER_ACTION_NEEDED_TWOFA_EXPIRED,
USER_ACTION_NEEDED_WEBAUTH_REQUIRED,
USER_ACTION_NEEDED_WRONG_TWOFA_CODE,
CAPTCHA_RESOLUTION_FAILED,
MAINTENANCE,
TERMS_VERSION_MISMATCH,
UNKNOWN_ERROR,
UNKNOWN_ERROR_PARTIAL_SYNC,
VENDOR_DOWN,
VENDOR_DOWN_BANK_DOWN,
VENDOR_DOWN_LINXO_DOWN
}