Fix : #8825 If attachment token expires, it throws a 500 error instead of Unauthenticated (#9043)

Fixes #8825

FilePathGuard implements token verification via verifyWorkspaceToken
function which throws AuthException error ,
since CanActivate expects a boolean value , we add a try catch while
verifying the token

if token is invalid/expired 
<img width="1470" alt="Screenshot 2024-12-12 at 9 44 58 PM"
src="https://github.com/user-attachments/assets/106a85dd-f894-46ea-80c3-f29b4ea5b4d3"
/>
else 
<img width="917" alt="Screenshot 2024-12-12 at 9 47 10 PM"
src="https://github.com/user-attachments/assets/d82168f4-d140-48dc-94a4-56773a93db83"
/>

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
munch-lax
2025-01-08 23:39:33 +05:30
committed by GitHub
parent d61409a5df
commit d324cac742
7 changed files with 108 additions and 50 deletions

View File

@ -1,4 +1,12 @@
export * from './animated-expandable-container/components/AnimatedExpandableContainer';
export * from './animated-expandable-container/types/AnimationDimension';
export * from './animated-expandable-container/types/AnimationDurationObject';
export * from './animated-expandable-container/types/AnimationDurations';
export * from './animated-expandable-container/types/AnimationMode';
export * from './animated-expandable-container/types/AnimationSize';
export * from './animated-expandable-container/utils/getCommonStyles';
export * from './animated-expandable-container/utils/getExpandableAnimationConfig';
export * from './animated-expandable-container/utils/getTransitionValues';
export * from './animated-placeholder/components/AnimatedPlaceholder';
export * from './animated-placeholder/components/EmptyPlaceholderStyled';
export * from './animated-placeholder/components/ErrorPlaceholderStyled';