MobileNativeFoundation / MobileNativeFoundation/Store

[Feature Request] getOrError and freshOrError

Open
#553 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Kotlin
Stars
3.4k
Forks
217
Avg merge
18m
Merged PRs (30d)
4

Description

Additionally: have you considered adding a getOrError() (and freshOrError()) that return a Result to the API? These are two functions I end up readding into all of my projects using Store, since the appropriate way to have a fetcher fail is by throwing. Which is fine if you're using .stream(), and much less fun if you forgot about that detail and called get() blindly

https://www.reddit.com/r/androiddev/comments/13mb2sz/comment/jkwwjxs/?utm_source=share&utm_medium=web2x&context=3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Store API around get(), fresh(), and stream() to understand their existing failure behavior and return types. Determine the intended Result behavior for getOrError() and freshOrError(), then add coverage for the new API methods and their failure cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.