Use well-typed errors

Open
#13 0 comments 3 reactions 1 assignee View on GitHub

@JarvisCraft is already working on this.

Since Mar 16, 2025.

Assessment

This issue has not been assessed yet.

Description

enhancement

Problem

Currently, enum Error is just a bunch of typed Strings which has the cons of:

  • Being hard to use it in granular manner;
  • Requiring allocations per each string which may never be used.

There also is a problem of not using the std::error::Error::source() infra.

Solution

Replace this with a well-typed error using thiserror for declarative definition.


PS: self-assigning the issue as I am already working on it.

Dominant language
Rust
Stars
275
Forks
12
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from ozontech/pg_doorman

All issues in ozontech/pg_doorman

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.