generated from yiisoft/package-template
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
ErrorCatcher renderers do not have access to the response object. #13
Comments
I see multiple ways solving it:
|
I prefer this solution. What you may need:
|
Like this? class ThrowableRenderer
{
// ...
public function render(\Throwable $t): RenderedError;
}
class RenderedError
{
public function getBody(): string;
public function getHeaders(): array;
public function getStatusCode(): int;
} |
yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What steps will reproduce the problem?
yiisoft/yii-web#146 issues would require you to add headers to the response. It is also required for other applications where a change in the cache header is warranted in the response, e.g. if the error is persistent, it may be appropriate to use
stale-if-error
with a higher value.What do you get instead?
It is not currently available.
The text was updated successfully, but these errors were encountered: