Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

按文档无法正确得到预期异常: BadRequestHttpException, MethodNotAllowedException #14

Open
liuqingliu opened this issue Jan 12, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@liuqingliu
Copy link

如题.版本 krisss/docker-webman:8.0-cli-alpine
需要按文档重写handler方法
protected function solveAllException(Throwable $e)
{
if ($e instanceof BaseException) {
$this->statusCode = $e->statusCode;
$this->header = $e->header;
$this->errorCode = $e->errorCode;
$this->errorMessage = $e->errorMessage;
$this->error = $e->error;
if (isset($e->data)) {
$this->responseData = array_merge($this->responseData, $e->data);
}
return ; // 在这里直接返回,否则会被下面的方法接管结果.导致500,Internal Server Error
}
$this->solveExtraException($e);
}

@Tinywan
Copy link
Owner

Tinywan commented Jan 13, 2024

验证器是抛出验证器异常ValidateException

@Tinywan Tinywan added the duplicate This issue or pull request already exists label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants