Skip to content

Example doesn't explain returning specific error depending on what went wrong #165

Description

@uh-kay

In the example it promises this:

// In a later example we will see how to return specific errors to the user

But there's no other example of this in the other examples.

It should show something like this:

let result = { 
  // do something 
}

case result {
  Ok(_) -> wisp.ok()
  Error(err) -> case err {
    Wibble -> wisp.internal_server_error()
    Wobble -> wisp.unprocessable_content()
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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