Skip to content

Commit

Permalink
#339: check for authentication failures
Browse files Browse the repository at this point in the history
  • Loading branch information
basmasking committed Oct 15, 2024
1 parent aa1e668 commit 0406ec4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions segments/bff.segment.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"./domain/creator/register/feature": { "default": { "access": "private" }},
"./domain/creator/updateFullName/feature": { "default": { "access": "public" }},
"./domain/creator/updateNickname/feature": { "default": { "access": "public" }},
"./domain/creator/updateFollowerCount/feature": { "default": { "access": "private" }},
"./domain/creator/updateFollowingCount/feature": { "default": { "access": "private" }},
"./domain/creator/updatePostCount/feature": { "default": { "access": "private" }},

"./domain/image/create/feature": { "default": { "access": "private" } },
"./domain/image/download/feature": { "default": { "access": "private" } },
Expand All @@ -40,7 +37,6 @@
"./domain/reaction/getByPostAggregated/feature": { "default": { "access": "public" } },
"./domain/reaction/remove/feature": { "default": { "access": "public" } },
"./domain/reaction/toggleRating/feature": { "default": { "access": "public" } },
"./domain/reaction/updateRatingCount/feature": { "default": { "access": "private" }},

"./domain/relation/aggregate/feature": { "default": { "access": "private" } },
"./domain/relation/exploreAggregated/feature": { "default": { "access": "public" } },
Expand Down
5 changes: 4 additions & 1 deletion src/webui/features/ErrorHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ type Props = {

export default function Feature({ error }: Props)
{
const isUnauthorized = error?.constructor?.name === 'Unauthorized';
const isUnauthorized = error?.constructor?.name === 'Unauthorized'
|| error === 'Invalid authorization type'
|| error === 'Invalid authorization key'
|| error === 'Session expired';

const ErrorPanel = <Panel type='normal'>
<Title>Oops...</Title>
Expand Down

0 comments on commit 0406ec4

Please sign in to comment.