|
|
@@ -72,9 +72,9 @@ class Bet extends Controller
|
|
|
}
|
|
|
$result = ['total' => $count, 'total_amount' => $totalAmount, 'data' => $list];
|
|
|
} catch (ValidationException $e) {
|
|
|
- return $this->error(HttpStatus::VALIDATION_FAILED, $e->validator->errors()->first());
|
|
|
+ return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
|
|
|
} catch (Exception $e) {
|
|
|
- return $this->error(HttpStatus::CUSTOM_ERROR, $e->getMessage());
|
|
|
+ return $this->error($e->getCode(), $e->getMessage());
|
|
|
}
|
|
|
return $this->success($result);
|
|
|
}
|