An error occurred while loading the file. Please try again.
-
pushkar191098 authored53b4b040
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
import enum
class Status(enum.Enum):
SUCCESS = {
'ok': True,
'http': {'status': 200},
'why': "request successful"
}
FAILURE = {
'ok': False,
'http': {'status': 500},
'why': 'request failed'
}
ERR_SYSTEM = {
'ok': False,
'http': {'status': 500},
'why': "Internal Server Error"
}
ERR_INVALID_DATA = {
'ok': False,
'http': {'status': 400},
'why': "Invalid Data"
}
ERR_MISSING_PARAMETERS = {
'ok': False,
'http': {'status': 400},
'why': "Data Missing"
}
CORRUPT_FILE = {
'ok': False,
'http': {'status': 500},
'why': 'uploaded file is corrupt'
}
DATA_NOT_FOUND = {
'ok': False,
'http': {'status': 404},
'why': 'data not found'
}
OPERATION_NOT_PERMITTED = {
'ok': False,
'http': {'status': 400},
'why': 'operation not permitted'
}
ERR_GATEWAY = {
'ok': False,
'http': {'status': 400},
'why': 'gateway error'
}
ERR_NOTFOUND_FILE = {
'ok': False,
'http': {'status': 400},
'why': 'file not found'
}
ERR_SCHEMA_VALIDATION = {
'ok': False,
'http': {'status': 400},
'why': 'please refer api contract to check your request structure'
}