|
|
@@ -117,6 +117,9 @@ class User extends Controller
|
|
|
return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
|
|
|
} catch (Exception $e) {
|
|
|
DB::rollBack();
|
|
|
+ if($e->getCode() == HttpStatus::CUSTOM_ERROR){
|
|
|
+ return $this->error(HttpStatus::CUSTOM_ERROR, $e->getMessage());
|
|
|
+ }
|
|
|
return $this->error(intval($e->getCode()));
|
|
|
}
|
|
|
return $this->success(msg: '已完成迁移');
|