Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Debug formatting Client errors should include the error message shown when display formatted #44

Closed
nikolaimerritt opened this issue May 23, 2023 · 1 comment

Comments

@nikolaimerritt
Copy link

Problem to Solve

An error message is given when a TypeDB Client error is display formatted. This error message is not produced when debug formatting the same error message. This is unintuitive, as debug printing an object should yield at least as much diagnostic information as display printing the object.

Current Workaround

We both debug format TypeDB Client errors to show the kind of error, and display format the errors to show their error message.

Proposed Solution

TypeDB Client errors show their enum instance and error message when debug formatted.

@sync-by-unito sync-by-unito bot closed this as completed May 26, 2023
nikolaimerritt added a commit to typedb/typeql that referenced this issue Jun 7, 2023
## What is the goal of this PR?
We improve the debug formatting for macro-generated errors, by including
more detail about the error. This solves issue
typedb/typedb-driver-rust#44

## What are the changes implemented in this PR?
We include the error code and error message in the debug format for
macro-generated errors. We do this by explicitly implimenting
`std::fmt::Debug`, inserting the error code and error message.
@flyingsilverfin
Copy link
Member

Done in #286

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants