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 · 6 comments
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
@hsluoyz
Copy link
Member

hsluoyz commented Jul 29, 2021

Hi @Kilerd , can you make a PR to fix it?

@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
Copy link
Member

hsluoyz commented Aug 1, 2021

@smrpn

@Kilerd
Copy link
Author

Kilerd commented Aug 2, 2021

so any idea how to implement it?

seems there are a lot scenarios to emit error? can someone just classify them into groups?

@hsluoyz hsluoyz pinned this issue Aug 19, 2022
@hsluoyz
Copy link
Member

hsluoyz commented Aug 19, 2022

@SiddheshKanawade plz work on this

/cc @hackerchai

@SiddheshKanawade
Copy link
Member

Ok

@hsluoyz hsluoyz unpinned this issue Feb 22, 2024
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

4 participants