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

considering add a customized configuration in CasbinService to config error mesage? #32

Open
Kilerd opened this issue Jul 29, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Kilerd
Copy link

Kilerd commented Jul 29, 2021

for now the middleware use original error page built in actix-web,like

Ok(req.into_response(HttpResponse::Forbidden().finish().into_body()));
Ok(req.into_response(HttpResponse::BadGateway().finish().into_body()));
Ok(req.into_response(HttpResponse::Unauthorized().finish().into_body()));

but for some cases, we wanna keep the error message having the same structured response like other error type.
so maybe add some fields in CasbinService to config the response of error payload?

@hsluoyz hsluoyz self-assigned this Jul 29, 2021
@hsluoyz hsluoyz added the question Further information is requested label Jul 29, 2021
@hackerchai
Copy link
Member

@Kilerd good suggstion. We will implement it in next version release

@hsluoyz hsluoyz added enhancement New feature or request and removed question Further information is requested labels Aug 1, 2021
@hsluoyz hsluoyz pinned this issue Aug 19, 2022
@hsluoyz hsluoyz unpinned this issue Feb 22, 2024
@casbin-rs casbin-rs deleted a comment from Kilerd Jan 6, 2025
@casbin-rs casbin-rs deleted a comment from SiddheshKanawade Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants