Skip to content

Create a new Error enum type #69

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

Closed
grunch opened this issue Dec 10, 2024 · 1 comment
Closed

Create a new Error enum type #69

grunch opened this issue Dec 10, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@grunch
Copy link
Member

grunch commented Dec 10, 2024

When a user send an wrong message to mostrod, mostrod responds with a message with Action: CantDo, we have the need to give more details with the reason of this CantDo message, for this we want to create a new enum Error, this enum must have different type of errors and mostrod will send this in the payload of a message with Action: CantDo, we need to modify the payload like this:

pub enum Payload {
    Order(SmallOrder),
    PaymentRequest(Option<SmallOrder>, String, Option<Amount>),
    TextMessage(String),
    Peer(Peer),
    RatingUser(u8),
    Amount(Amount),
    Dispute(Uuid, Option<u16>),
    Error(Error),
}
@grunch
Copy link
Member Author

grunch commented Dec 28, 2024

closing via #70

@grunch grunch closed this as completed Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant