-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdavinci.error.mock.ts
339 lines (326 loc) · 9.35 KB
/
davinci.error.mock.ts
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
/**
* Sample error responses from DaVinci
*/
export const error0a = {
interactionId: '18d94e62-3625-4c53-bbfe-004a77cc2307',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: 'cqm26fxq1v',
capabilityName: 'userLookup',
errorCategory: 'NotSet',
code: ' Invalid username and/or password',
cause: null,
expected: true,
message: ' Invalid username and/or password',
httpResponseCode: 400,
isResponseCompatibleWithMobileAndWebSdks: true,
};
export const error0b = {
interactionId: '17f3c003-7105-4955-8a79-db95387ce80b',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: 'agjdg5vxr2',
capabilityName: 'createUser',
errorCategory: 'NotSet',
code: 400,
cause: null,
expected: true,
message: 'invalidInput "username" - must not be blank',
httpResponseCode: 400,
isResponseCompatibleWithMobileAndWebSdks: true,
};
export const error0c = {
interactionId: '17bf5caf-8296-4805-b0b4-78ecc30a28dc',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '53ab83a4a4ab919d9f2cb02d9e111ac8',
connectorId: 'errorConnector',
id: 'ww868uq428',
capabilityName: 'customErrorMessage',
errorCategory: 'NotSet',
code: 'Unexpected value received',
cause: null,
expected: true,
message: 'An unexpected error has occurred',
httpResponseCode: 400,
isResponseCompatibleWithMobileAndWebSdks: true,
};
// Bad Password
export const error1a = {
interactionId: '18bd524d-4afd-4f79-a0b5-a4f16b63bf48',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: 'dnu7jt3sjz',
capabilityName: 'checkPassword',
errorCategory: 'Unexpected',
code: ' Invalid username and/or password',
cause: null,
expected: false,
message: ' Invalid username and/or password',
httpResponseCode: 400,
details: [
{
rawResponse: {
id: '5c72f2de-8eea-46b5-877f-cb61dcae294d',
code: 'INVALID_DATA',
message:
'The request could not be completed. One or more validation errors were in the request.',
details: [
{
code: 'INVALID_VALUE',
target: 'password',
message: 'The provided password did not match provisioned password',
innerError: {
failuresRemaining: 3,
},
},
],
},
statusCode: 400,
},
],
isResponseCompatibleWithMobileAndWebSdks: true,
};
export const error1b = {
interactionId: '1754547c-0ce7-4075-a1c7-23ca17a59830',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: '0c41v9ejkb',
capabilityName: 'resetPassword',
errorCategory: 'Unexpected',
code: 400,
cause: null,
expected: false,
message:
'newPasswordNotValid newPassword: New password did not satisfy password policy requirements',
httpResponseCode: 400,
details: [
{
rawResponse: {
id: '4ddf56dd-03d3-43d0-befa-ed557e27d332',
code: 'INVALID_DATA',
message:
'The request could not be completed. One or more validation errors were in the request.',
details: [
{
code: 'INVALID_VALUE',
target: 'newPassword',
message: 'New password did not satisfy password policy requirements',
innerError: {
unsatisfiedRequirements: ['history'],
history:
'The provided new password cannot be the same as the current password or any password in the password history.',
},
},
],
},
statusCode: 400,
},
],
isResponseCompatibleWithMobileAndWebSdks: true,
};
// Bad username
export const error1c = {
interactionId: '172de989-bb7f-4f05-aa38-a004b1c4cc16',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: 'cqm26fxq1v',
capabilityName: 'userLookup',
errorCategory: 'Expected',
code: ' Invalid username and/or password',
cause: null,
expected: true,
message: ' Invalid username and/or password',
httpResponseCode: 400,
details: [
{
rawResponse: {
_embedded: {
users: [],
},
count: 0,
size: 0,
userFilter: '(username eq "sdfsdfsdfsdf")',
},
statusCode: 200,
},
],
isResponseCompatibleWithMobileAndWebSdks: true,
};
// Registration with invalid email
export const error1d = {
interactionId: '1742de9b-43be-4a26-bace-e0793c88f882',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: 'agjdg5vxr2',
capabilityName: 'createUser',
errorCategory: 'InvalidData',
code: 400,
cause: null,
expected: true,
message: 'invalidValue email: must be a well-formed email address',
httpResponseCode: 400,
details: [
{
rawResponse: {
id: 'cc33f141-18ea-4e94-ad2b-ce031df11b3a',
code: 'INVALID_DATA',
message: 'Validation Error : [email must be a well-formed email address]',
details: [
{
code: 'INVALID_VALUE',
target: 'email',
message: 'must be a well-formed email address',
},
],
},
statusCode: 400,
},
],
isResponseCompatibleWithMobileAndWebSdks: true,
};
export const error1e = {
interactionId: '17c6a5d5-31d8-4416-b9cf-7b5e4d8ed5b1',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: 'agjdg5vxr2',
capabilityName: 'createUser',
errorCategory: 'InvalidData',
code: 400,
cause: null,
expected: true,
message: 'uniquenessViolation username: is unique but a non-unique value is provided',
httpResponseCode: 400,
details: [
{
rawResponse: {
id: '6a4b3730-348c-400c-ba38-e0d8e76621dc',
code: 'INVALID_DATA',
message:
'The request could not be completed. One or more validation errors were in the request.',
details: [
{
code: 'UNIQUENESS_VIOLATION',
target: 'username',
message: 'is unique but a non-unique value is provided',
},
],
},
statusCode: 400,
},
],
isResponseCompatibleWithMobileAndWebSdks: true,
};
export const error1f = {
interactionId: '17c6a5d5-31d8-4416-b9cf-7b5e4d8ed5b1',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: 'agjdg5vxr2',
capabilityName: 'createUser',
errorCategory: 'InvalidData',
code: 400,
cause: null,
expected: true,
message: 'uniquenessViolation username: is unique but a non-unique value is provided',
httpResponseCode: 400,
details: [
{
rawResponse: {
id: 'cc33f141-18ea-4e94-ad2b-ce031df11b3a',
code: 'INVALID_DATA',
message: 'Validation Error : [email must be a well-formed email address]',
details: [
{
code: 'INVALID_VALUE',
target: 'password',
message: 'The provided password did not match provisioned password',
innerError: {
failuresRemaining: 3,
},
},
{
code: 'INVALID_VALUE',
target: 'email',
message: 'must be a well-formed email address',
},
],
},
statusCode: 400,
},
{
rawResponse: {
id: '6a4b3730-348c-400c-ba38-e0d8e76621dc',
code: 'INVALID_DATA',
message:
'The request could not be completed. One or more validation errors were in the request.',
details: [
{
code: 'UNIQUENESS_VIOLATION',
target: 'username',
message: 'is unique but a non-unique value is provided',
},
],
},
statusCode: 400,
},
],
isResponseCompatibleWithMobileAndWebSdks: true,
};
export const error2a = {
interactionId: '18bd524d-4afd-4f79-a0b5-a4f16b63bf48',
code: 'requestTimedOut',
message: 'Request timed out. Please try again.',
};
// HTTP status code was 200, but the response was an failure
export const error2b = {
environment: {
id: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
},
status: 'FAILED',
error: {
code: 'server_error',
message: 'Request timed out. Please try again.',
},
};
export const error3 = {
cause: null,
logLevel: 'error',
serviceName: null,
message: 'Unauthorized!',
errorMessage: 'Unauthorized!',
success: false,
httpResponseCode: 401,
code: 1999,
};
// Bad username
export const error4 = {
interactionId: '175a98ab-5048-434c-8734-d82eb33fe975',
companyId: '02fb4743-189a-4bc7-9d6c-a919edfe6447',
connectionId: '94141bf2f1b9b59a5f5365ff135e02bb',
connectorId: 'pingOneSSOConnector',
id: 'dnu7jt3sjz',
capabilityName: 'checkPassword',
isErrorCustomized: true,
errorCategory: 'NotSet',
code: 'validationError',
cause: null,
metricAttributes: {
errorCustomization: 'NONE',
},
expected: true,
message: 'Validation Error',
httpResponseCode: 400,
details: [
{
message: 'identifer must be a uuid',
},
],
doNotSendToOE: true,
};