react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

fix(useLogoutAccessDenied): handle errors without redirect

Open carloshv93 opened this issue 6 months ago • 3 comments

Problem

Undefined redirectTo values throws error Fix #10177

Solution

Create a handleRedirect function to properly handle either valid URL or undefined URLS

How To Test

Steps to reproduce

Follow steps from #10177

Additional Checks

  • [x] The PR targets master for a bugfix or a documentation fix, or next for a feature
  • [ ] The PR includes unit tests (if not possible, describe why)
  • [ ] The PR includes one or several stories (if not possible, describe why)
  • [ ] The documentation is up to date

Also, please make sure to read the contributing guidelines.

Evidence

image

carloshv93 avatar May 30 '25 20:05 carloshv93

Thanks for the PR! Would you mind adding some too? @djhi, I might not have understood what you're requesting. Could you clarify your change request a bit more? please

carloshv93 avatar Jun 02 '25 14:06 carloshv93

Thanks for the PR! Would you mind adding some too? @djhi, I might not have understood what you're requesting. Could you clarify your change request a bit more? please

Oups, sorry for the typo... Can you add some unit tests as well?

djhi avatar Jun 02 '25 14:06 djhi

Thanks for the PR! Would you mind adding some too? @djhi, I might not have understood what you're requesting. Could you clarify your change request a bit more? please

Oups, sorry for the typo... Can you add some unit tests as well?

Unit test added

carloshv93 avatar Jun 16 '25 18:06 carloshv93