errors()->first(); throw new ApiException([ 'message' => $firstError, "code" => Response::HTTP_UNPROCESSABLE_ENTITY ]); } }