-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patherrors.php
More file actions
100 lines (97 loc) · 3.06 KB
/
Copy patherrors.php
File metadata and controls
100 lines (97 loc) · 3.06 KB
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
<?php
declare(strict_types=1);
use OpenRuntimes\Executor\Exception;
return [
/* General */
Exception::GENERAL_UNKNOWN => [
'name' => Exception::GENERAL_UNKNOWN,
'short' => 'Whoops',
'message' => 'Internal server error.',
'code' => 500,
],
Exception::GENERAL_ROUTE_NOT_FOUND => [
'name' => Exception::GENERAL_ROUTE_NOT_FOUND,
'short' => 'Not found',
'message' => 'The requested route was not found.',
'code' => 404,
],
Exception::GENERAL_UNAUTHORIZED => [
'name' => Exception::GENERAL_UNAUTHORIZED,
'short' => 'Unauthorized',
'message' => 'You are not authorized to access this resource.',
'code' => 401,
],
/* Build */
Exception::BUILD_FAILED => [
'name' => Exception::BUILD_FAILED,
'short' => 'Build failed',
'message' => 'Build failed.',
'code' => 400,
'publish' => false,
],
/* Runtime */
Exception::RUNTIME_FAILED => [
'name' => Exception::RUNTIME_FAILED,
'short' => 'Failed',
'message' => 'Runtime failed.',
'code' => 400,
'publish' => false,
],
Exception::RUNTIME_TIMEOUT => [
'name' => Exception::RUNTIME_TIMEOUT,
'short' => 'Timeout',
'message' => 'Timed out waiting for runtime.',
'code' => 400,
],
Exception::RUNTIME_NOT_FOUND => [
'name' => Exception::RUNTIME_CONFLICT,
'short' => 'Not found',
'message' => 'Runtime not found',
'code' => 404,
],
Exception::RUNTIME_CONFLICT => [
'name' => Exception::RUNTIME_CONFLICT,
'short' => 'Conflict',
'message' => 'Runtime already exists ',
'code' => 409,
],
/* Execution */
Exception::EXECUTION_BAD_REQUEST => [
'name' => Exception::EXECUTION_BAD_REQUEST,
'short' => 'Invalid request',
'message' => 'Execution request was invalid.',
'code' => 400,
],
Exception::EXECUTION_BAD_JSON => [
'name' => Exception::EXECUTION_BAD_JSON,
'short' => 'Invalid response',
'message' => 'Execution resulted in binary response, but JSON response does not allow binaries. Use "Accept: multipart/form-data" header to support binaries.',
'code' => 400,
],
Exception::EXECUTION_TIMEOUT => [
'name' => Exception::EXECUTION_TIMEOUT,
'short' => 'Timeout',
'message' => 'Timed out waiting for execution.',
'code' => 400,
],
/* Logs */
Exception::LOGS_TIMEOUT => [
'name' => Exception::LOGS_TIMEOUT,
'short' => 'Timeout',
'message' => 'Timed out waiting for logs.',
'code' => 504,
],
/* Command */
Exception::COMMAND_TIMEOUT => [
'name' => Exception::COMMAND_TIMEOUT,
'short' => 'Timeout',
'message' => 'Operation timed out.',
'code' => 500,
],
Exception::COMMAND_FAILED => [
'name' => Exception::COMMAND_FAILED,
'short' => 'Failed',
'message' => 'Failed to execute command.',
'code' => 500,
],
];