You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/Http/Controllers/API/Admin/ServerController.php
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -113,11 +113,13 @@ public function store(Request $request)
113
113
], 400);
114
114
} catch (TransferException$ex) {
115
115
Log::warning($ex);
116
+
116
117
returnresponse()->json([
117
118
'error' => 'A TransferException was encountered while trying to contact the daemon, please ensure it is online and accessible. This error has been logged.',
118
119
], 504);
119
120
} catch (\Exception$ex) {
120
121
Log::error($ex);
122
+
121
123
returnresponse()->json([
122
124
'error' => 'An unhandled exception occured while attemping to add this server. Please try again.',
123
125
], 500);
@@ -146,18 +148,20 @@ public function delete(Request $request, $id)
146
148
], 400);
147
149
} catch (TransferException$ex) {
148
150
Log::warning($ex);
151
+
149
152
returnresponse()->json([
150
153
'error' => 'A TransferException was encountered while trying to contact the daemon, please ensure it is online and accessible. This error has been logged.',
151
154
], 504);
152
155
} catch (\Exception$ex) {
153
156
Log::error($ex);
157
+
154
158
returnresponse()->json([
155
159
'error' => 'An unhandled exception occured while attemping to add this server. Please try again.',
156
160
], 500);
157
161
}
158
162
}
159
163
160
-
/**
164
+
/**
161
165
* Update the details for a server.
162
166
*
163
167
* @param \Illuminate\Http\Request $request
@@ -190,6 +194,7 @@ public function details(Request $request, $id)
190
194
], 400);
191
195
} catch (\Exception$ex) {
192
196
Log::error($ex);
197
+
193
198
returnresponse()->json([
194
199
'error' => 'An unhandled exception occured while attemping to modify this server. Please try again.',
195
200
], 500);
@@ -223,11 +228,13 @@ public function container(Request $request, $id)
223
228
], 400);
224
229
} catch (TransferException$ex) {
225
230
Log::warning($ex);
231
+
226
232
returnresponse()->json([
227
233
'error' => 'A TransferException was encountered while trying to contact the daemon, please ensure it is online and accessible. This error has been logged.',
228
234
], 504);
229
235
} catch (\Exception$ex) {
230
236
Log::error($ex);
237
+
231
238
returnresponse()->json([
232
239
'error' => 'An unhandled exception occured while attemping to modify this server container. Please try again.',
233
240
], 500);
@@ -256,6 +263,7 @@ public function install(Request $request, $id)
256
263
], 400);
257
264
} catch (\Exception$ex) {
258
265
Log::error($ex);
266
+
259
267
returnresponse()->json([
260
268
'error' => 'An unhandled exception occured while attemping to toggle the install status for this server. Please try again.',
261
269
], 500);
@@ -283,6 +291,7 @@ public function rebuild(Request $request, $id)
283
291
returnresponse('', 204);
284
292
} catch (TransferException$ex) {
285
293
Log::warning($ex);
294
+
286
295
returnresponse()->json([
287
296
'error' => 'A TransferException was encountered while trying to contact the daemon, please ensure it is online and accessible. This error has been logged.',
288
297
], 504);
@@ -318,11 +327,13 @@ public function suspend(Request $request, $id)
318
327
], 400);
319
328
} catch (TransferException$ex) {
320
329
Log::warning($ex);
330
+
321
331
returnresponse()->json([
322
332
'error' => 'A TransferException was encountered while trying to contact the daemon, please ensure it is online and accessible. This error has been logged.',
323
333
], 504);
324
334
} catch (\Exception$ex) {
325
335
Log::error($ex);
336
+
326
337
returnresponse()->json([
327
338
'error' => 'An unhandled exception occured while attemping to ' . $action . ' this server. Please try again.',
328
339
], 500);
@@ -363,11 +374,13 @@ public function build(Request $request, $id)
363
374
], 400);
364
375
} catch (TransferException$ex) {
365
376
Log::warning($ex);
377
+
366
378
returnresponse()->json([
367
379
'error' => 'A TransferException was encountered while trying to contact the daemon, please ensure it is online and accessible. This error has been logged.',
368
380
], 504);
369
381
} catch (\Exception$ex) {
370
382
Log::error($ex);
383
+
371
384
returnresponse()->json([
372
385
'error' => 'An unhandled exception occured while attemping to modify the build settings for this server. Please try again.',
373
386
], 500);
@@ -400,11 +413,13 @@ public function startup(Request $request, $id)
400
413
], 400);
401
414
} catch (TransferException$ex) {
402
415
Log::warning($ex);
416
+
403
417
returnresponse()->json([
404
418
'error' => 'A TransferException was encountered while trying to contact the daemon, please ensure it is online and accessible. This error has been logged.',
405
419
], 504);
406
420
} catch (\Exception$ex) {
407
421
Log::error($ex);
422
+
408
423
returnresponse()->json([
409
424
'error' => 'An unhandled exception occured while attemping to modify the startup settings for this server. Please try again.',
0 commit comments