8904e180d109b8ffcf9dcf974bac87ba926eb34e
When save() encounters a 401 or 403 error, the HTTP client dispatches SESSION_EXPIRED_EVENT which triggers auth handling and navigation to login. However, setSaveError was called first, causing a brief flash of an 'Unauthorized' message before the redirect. Now, isAuthError(err) checks if the error is a 401/403 before setting saveError. Auth errors are rethrown without setting error state, allowing the auth handler to deal with session expiry cleanly without UX confusion. - Import isAuthError from api/client in useConfigItem hook - Check for auth errors in the save() catch block before setSaveError - Add tests for 401 and 403 error handling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
No description provided
Languages
Python
61.2%
TypeScript
24.9%
HTML
8.4%
Markdown
2.5%
Roff
0.9%
Other
2%