Skip to content

use errors instead of panic #415

Open
@zignis

Description

@zignis

There are numerous instances of panic in the codebase, which are not ideal for production use cases. This often results in crashes of the processes on our production machines because we accept dynamic documents from users, which might contain malformed data. I believe that returning errors instead of panicking would be a better approach.

For instance, the following line has been causing panics in our production instance:

panic!("Couldn't get item's parent")

We cannot always verify whether the incoming data from the client is correct.

I'm ready to work on this if you give me some hints about your preferred approach.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions