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

Improved list and feed errors #1798

Merged
merged 4 commits into from
Nov 3, 2023
Merged

Improved list and feed errors #1798

merged 4 commits into from
Nov 3, 2023

Conversation

pfrazee
Copy link
Collaborator

@pfrazee pfrazee commented Nov 2, 2023

  • Improve the error state of feedgens to appear less frightening
  • Fix the error state of profile lists
  • Unsave lists when deleted

Feedgen errors

CleanShot 2023-11-02 at 15 09 01@2x CleanShot 2023-11-02 at 15 09 07@2x

List error state

CleanShot 2023-11-02 at 13 47 55@2x

Copy link
Member

@estrattonbailey estrattonbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, no blockers

Comment on lines +30 to +37
export enum KnownError {
FeedgenDoesNotExist,
FeedgenMisconfigured,
FeedgenBadResponse,
FeedgenOffline,
FeedgenUnknown,
Unknown,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a hill I'd die on, but I think we should only use string enums. These get evaluated to numbers, which makes rearranging difficult, etc.

export enum KnownError {
  FeedgenDoesNotExist = 'FeedgenDoesNotExist'
  ...
}

Works 100% of the time, very clear.

feed.knownError === KnownError.Unknown
) {
return (
<ErrorMessage message={feed.error} onPressTryAgain={onPressTryAgain} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehe so we fall back to the red error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah ya but only for non-feedgens

@pfrazee pfrazee merged commit 445f976 into main Nov 3, 2023
4 checks passed
@pfrazee pfrazee deleted the list-and-feed-errors branch November 3, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants