· 5 years ago · Feb 25, 2021, 03:52 PM
1BadRequestError.ERROR_BAD_REQUEST = [4000000, 'Bad Request'];
2BadRequestError.ERROR_BAD_REQUEST_MISSING_FILE_DATA = [4000001, 'Missing file data'];
3BadRequestError.ERROR_BAD_REQUEST_PRESET_NOT_ASSIGNED_TO_FRAME = [4000002, 'Preset is not assigned to frame'];
4BadRequestError.ERROR_BAD_REQUEST_USER_ALREADY_ACTIVE = [4000003, 'User is already active'];
5BadRequestError.ERROR_BAD_REQUEST_NON_MATCHING_PASSWORDS = [4000004, 'Passwords does not match'];
6BadRequestError.ERROR_BAD_REQUEST_DMS_ROOT_ONLY = [4000005, 'DMS :name can only be added to the user as the root user'];
7BadRequestError.ERROR_BAD_REQUEST_DMS_INVALID_CREDENTIALS = [4000006, 'Invalid DMS credentials supplied'];
8BadRequestError.ERROR_BAD_REQUEST_EXCEEDED_EXTERIOR_COUNT = [
9 4000007,
10 "Can not process this image because exterior image count :count would exceed user's maximum processing count for exterior images :maxCount",
11];
12BadRequestError.ERROR_BAD_REQUEST_NO_IMAGES_TO_PROCESS = [4000008, 'No images to process'];
13BadRequestError.ERROR_BAD_REQUEST_NO_COLLAGES_TO_PROCESS = [4000009, 'No collages to process'];
14BadRequestError.ERROR_BAD_REQUEST_NO_COLLAGES_TO_PROCESS = [4000010, 'No collages to process'];
15BadRequestError.ERROR_BAD_REQUEST_COLLAGE_MISSING_POSITIONS = [
16 4000011,
17 'Collage with id :collageId is missing positions :positions',
18];
19BadRequestError.ERROR_BAD_REQUEST_MAXIMUM_NUMBER_API_CALLS = [
20 4000012,
21 'You have reached the maximum number of API calls.',
22];
23BadRequestError.ERROR_BAD_REQUEST_VALIDATION_ERROR = [4000013, 'Validation error'];
24BadRequestError.ERROR_BAD_REQUEST_INVALID_IMAGE_TYPE = [4000014, 'Invalid image type'];
25BadRequestError.ERROR_BAD_REQUEST_MISSING_PRIMARY_KEY = [4000015, 'Primary key field :field is required'];
26BadRequestError.ERROR_BAD_REQUEST_RESET_TOKEN_EXPIRED = [4000016, 'Reset token has expired'];
27BadRequestError.ERROR_BAD_REQUEST_USER_PAYMENT_ALREADY_CONVERTED = [
28 4000017,
29 'User is already converted to the new payment system',
30];
31BadRequestError.ERROR_BAD_REQUEST_MISSING_BODY_FROM_CUSTOMER_ID = [
32 4000018,
33 'Missing fromCustomerId in the request body',
34];
35BadRequestError.ERROR_BAD_REQUEST_MISSING_BODY_FROM_CLIENT_ID = [4000019, 'Missing fromClientId in the request body'];
36
37
38ConflictError.ERROR_CONFLICT = [4090000, 'Forbidden'];
39ConflictError.ERROR_CONFLICT_DUPLICATE_BACKGROUND = [4090001, 'Background with name :backgroundName already exists'];
40ConflictError.ERROR_CONFLICT_COLLAGE_PRESET_DUPLICATE_ASSIGNMENT = [
41 4090002,
42 'Collage with id :collageId is already assigned to the preset with id :presetId',
43];
44ConflictError.ERROR_CONFLICT_PRESET_TARGET_DUPLICATE_POSITION = [
45 4090003,
46 'Position :position is already assigned to the preset with id :presetId',
47];
48ConflictError.ERROR_CONFLICT_DUPLICATE_USER_DMS = [4090004, 'DMS :name is already added to the user iwth id :userId'];
49ConflictError.ERROR_CONFLICT_DUPLICATE_VEHICLE_DETAILS = [4090005, 'Vehicle details already exists'];
50ConflictError.ERROR_CONFLICT_DUPLICATE_USER = [4090006, 'User with email :email or uid :uid already exists'];
51ConflictError.ERROR_CONFLICT_DUPLICATE_USER_EMAIL = [4090007, 'User with email :email already exists'];
52
53
54ForbiddenError.ERROR_FORBIDDEN = [4030000, 'Forbidden'];
55ForbiddenError.ERROR_FORBIDDEN_RESOURCE_OWNERSHIP = [4030001, 'User does not have permission to access this resource'];
56ForbiddenError.ERROR_FORBIDDEN_CUSTOMER_RESOURCE_OWNERSHIP = [
57 4030002,
58 'Customer does not have permission to access this resource',
59];
60ForbiddenError.ERROR_FORBIDDEN_CUSTOMER_CLIENT_OWNERSHIP = [
61 4030003,
62 'Customer does not have permission to access this client',
63];
64ForbiddenError.ERROR_FORBIDDEN_BAD_CREDENTIALS = [4030004, 'Invalid email or password'];
65ForbiddenError.ERROR_FORBIDDEN_CLIENT_BACKGROUND_NOT_ASSIGNED = [
66 4030005,
67 'Client :clientId does not have assigned background :backgroundId',
68];
69ForbiddenError.ERROR_FORBIDDEN_USER_BACKGROUND_NOT_ASSIGNED = [
70 4030006,
71 'User :userId does not have assigned background :backgroundId',
72];
73ForbiddenError.ERROR_FORBIDDEN_EVENT_NOT_ACTIVE = [4030007, 'Event with id :eventId is not active'];
74ForbiddenError.ERROR_FORBIDDEN_CUSTOMER_INSUFFICIENT_CREDITS = [
75 4030008,
76 'Customer :customerId does not have enough credits. Please contact support.',
77];
78ForbiddenError.ERROR_FORBIDDEN_USER_INSUFFICIENT_CREDITS = [
79 4030009,
80 'User :userId does not have enough credits. Please contact support.',
81];
82ForbiddenError.ERROR_FORBIDDEN_PRESET_ALREADY_EXISTS = [4030010, 'Preset :name already exists'];
83ForbiddenError.ERROR_FORBIDDEN_PRESET_IS_NOT_ASSIGNED_TO_USER = [
84 4030011,
85 'Preset :presetId is not assigned to user :userId',
86];
87ForbiddenError.ERROR_FORBIDDEN_FIELD_MODIFICATION = [
88 4030012,
89 'Logged in user does not have permissions to update following filds: :fields',
90];
91ForbiddenError.ERROR_FORBIDDEN_INVALID_PASSWORD = [4030013, 'Invalid password'];
92ForbiddenError.ERROR_FORBIDDEN_CANNOT_CREATE_CUSTOMER = [4030014, 'Customer :customerId cannot create other customers'];
93ForbiddenError.ERROR_FORBIDDEN_CUSTOMER_BACKGROUND_NOT_ASSIGNED = [
94 4030015,
95 'Customer :customerId does not have assigned background :backgroundId',
96];
97ForbiddenError.ERROR_FORBIDDEN_PRESET_IS_NOT_ASSIGNED_TO_USER = [
98 4030016,
99 'Preset :presetId is not assigned to user :userId',
100];
101ForbiddenError.ERROR_FORBIDDEN_CLIENT_PRESET_NOT_ASSIGNED = [
102 4030017,
103 'Client :clientId does not have assigned preset :presetId',
104];
105ForbiddenError.ERROR_FORBIDDEN_CUSTOMER_PRESET_NOT_ASSIGNED = [
106 4030018,
107 'Customer :customerId does not have assigned preset :presetId',
108];
109ForbiddenError.ERROR_FORBIDDEN_CLIENT_RESOURCE_OWNERSHIP = [
110 4030019,
111 'Client does not have permission to access this resource',
112];
113ForbiddenError.ERROR_FORBIDDEN_CLIENT_INSUFFICIENT_CREDITS = [
114 4030020,
115 'Client :clientId does not have enough credits. Please contact support.',
116];
117
118
119GoneError.ERROR_GONE = [4100000, 'Gone'];
120GoneError.ERROR_GONE_DEPRECATED_ROUTE = [4100001, 'This route has been deprecated. Please use the newer API version'];
121
122
123InternalServerError.ERROR_INTERNAL_SERVER = [5000000, 'Internal Server Error'];
124InternalServerError.ERROR_INTERNAL_SERVER_DUPLICATE_CONSTANT_DEFINITION = [
125 5000001,
126 'Constant definition already exists',
127];
128InternalServerError.ERROR_INTERNAL_SERVER_MISSING_SERVICE = [5000002, 'Service :serviceName does not exist'];
129
130
131NotFoundError.ERROR_NOT_FOUND = [4040000, 'Not Found'];
132NotFoundError.ERROR_NOT_FOUND_USER_ID = [4040001, 'User with id :userId not found'];
133NotFoundError.ERROR_NOT_FOUND_CUSTOMER_ID = [4040002, 'Customer with id :customerId not found'];
134NotFoundError.ERROR_NOT_FOUND_CLIENT_ID = [4040003, 'Client with id :clientId not found'];
135NotFoundError.ERROR_NOT_FOUND_BACKGROUND_ID = [4040004, 'Background with id :backgroundId not found'];
136NotFoundError.ERROR_NOT_FOUND_PRESET_ID = [4040005, 'Preset with id :presetId not found'];
137NotFoundError.ERROR_NOT_FOUND_COLLAGE_ID = [4040006, 'Collage with id :collageId not found'];
138NotFoundError.ERROR_NOT_FOUND_COLLAGE_PRESET_ASSIGNMENT = [
139 4040007,
140 'Collage with id :collageId is not assigned to the preset with id :presetId',
141];
142NotFoundError.ERROR_NOT_FOUND_DEVICE_ID = [4040008, 'Device with id :deviceId not found'];
143NotFoundError.ERROR_NOT_FOUND_EVENT_ID = [4040009, 'Event with id :eventId not found'];
144NotFoundError.ERROR_NOT_FOUND_CLIENT_WEBHOOK_ID = [4040010, 'Client Webhook with id :clientWebhookId not found'];
145NotFoundError.ERROR_NOT_FOUND_FILE_ID = [4040011, 'File with id :fileId not found'];
146NotFoundError.ERROR_NOT_FOUND_BACKGROUND_FILE_ID = [4040012, 'Background File with file id :fileId not found'];
147NotFoundError.ERROR_NOT_FOUND_BACKGROUND_ID = [4040013, 'Background with id :backgroundId not found'];
148NotFoundError.ERROR_NOT_FOUND_VEHICLE_ID = [4040014, 'Vehicle with id :vehicleId not found'];
149NotFoundError.ERROR_NOT_FOUND_VEHICLE_FILE_ID = [4040015, 'Vehicle File with id :fileId not found'];
150NotFoundError.ERROR_NOT_FOUND_TARGET_ID = [4040016, 'Target with id :targetId not found'];
151NotFoundError.ERROR_NOT_FOUND_PRESET_TARGET_ID = [4040017, 'Preset Target with id :presetTargetId not found'];
152NotFoundError.ERROR_NOT_FOUND_TARGET_FILE_TYPE = [
153 4040018,
154 'Target with id :targetId does not have file with type :type',
155];
156NotFoundError.ERROR_NOT_FOUND_PRESET_TARGET_FILE_TYPE = [
157 4040019,
158 'Preset Target with id :presetTargetId does not have file with type :type',
159];
160NotFoundError.ERROR_NOT_FOUND_FRAME_ID = [4040020, 'Frame with id :frameId not found'];
161NotFoundError.ERROR_NOT_FOUND_VEHICLE_IMAGE_ID = [
162 4040021,
163 'Image with id :imageId not found for the vehicle with id :vehicleId',
164];
165NotFoundError.ERROR_NOT_FOUND_USER_EMAIL = [4040022, 'User with email :email not found'];
166NotFoundError.ERROR_NOT_FOUND_DMS_ID = [4040023, 'DMS with id :dmsId not found'];
167NotFoundError.ERROR_NOT_FOUND_IMAGE_ID = [4040024, 'Image with id :imageId not found'];
168NotFoundError.ERROR_NOT_FOUND_VEHICLE_DETAILS = [4040025, 'Details for vehicle with id :vehicleId not found'];
169NotFoundError.ERROR_NOT_FOUND_ROUTE_NOT_MATCHED = [4040026, 'Route not matched'];
170NotFoundError.ERROR_NOT_FOUND_EVENT_NAME = [4040027, 'Event with name :eventName not found'];
171NotFoundError.ERROR_NOT_FOUND_ENTITY_ID = [4040028, ':modelName with id :id not found'];
172NotFoundError.ERROR_NOT_FOUND_USER_DMS = [4040029, 'DMS with id :dmsId not found for user with id :userId'];
173NotFoundError.ERROR_NOT_FOUND_BACKGROUND_FLOOR_ID = [4040030, 'Background Floor with id :backgroundFloorId not found'];
174NotFoundError.ERROR_NOT_FOUND_BACKGROUND_WALL_ID = [4040031, 'Background Wall with id :backgroundWallId not found'];
175NotFoundError.ERROR_NOT_FOUND_BACKGROUND_OFFER_ID = [4040032, 'Background Offer with id :backgroundOfferId not found'];
176
177
178NotImplementedError.ERROR_NOT_IMPLEMENTED = [5010000, 'Not Implemented'];
179NotImplementedError.ERROR_NOT_IMPLEMENTED_METHOD = [5010001, 'Method :method is not implemented'];
180
181
182UnprocessableEntityError.ERROR_UNPROCESSABLE_ENTITY = [4220000, 'Unprocessable Entity'];
183UnprocessableEntityError.ERROR_UNPROCESSABLE_ENTITY_IMAGE_ALREADY_PROCESSING = [
184 4220001,
185 'Image with id :imageId is already being processed',
186];
187UnprocessableEntityError.ERROR_UNPROCESSABLE_ENTITY_VEHICLE_ALREADY_PROCESSING = [
188 4220002,
189 'Vehicle with id :vehicleId is already being processed',
190];
191UnprocessableEntityError.ERROR_UNPROCESSABLE_ENTITY_IMAGE_NO_ORIGINAL_FILE = [
192 4220003,
193 'Image with id :imageId does not have an original file uploaded',
194];