Skip to content

Starting a server when a cluster can't connect throws exception that requires reading Craft to find #13

@adkron

Description

@adkron

There is a match error on :pang when Craft.Raft.start_group/4 can't ping a node in the cluster. It isn't clear what the match error means without digging in and reading the code in Craft. It would be nice if the error returned something more informative.

Option ideas

  1. Change the return type of start_group to be an :ok or an error tuple.
    a. The reason part of the error tuple is a map with extra info
    b. The reason part of the error tuple is an exception struct that the caller could raise if they would like.
  2. Change the exception to be something that is specific to Craft and carries information like the node that couldn't connect, etc.

I'm happy to help, but I wasn't sure of which direction you prefer or if you have a different idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions