New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider remove error_chain dependency #297

svartalf opened this Issue May 25, 2018 · 3 comments


2 participants

svartalf commented May 25, 2018

Related to rust-lang-nursery/error-chain#240, tera::Error instances are !Sync.

For example, it is impossible to return tera::Error directly from the actix-web handler, and it is easier just to suppress it:

Since tera::Error is quite simple, it might be worth to replace error_chain! call with a plain enum or use the failure crate.


This comment has been minimized.


Keats commented May 28, 2018

That's a breaking change so for the next major version.

Related recent discussion:

Failure seems nice but not really actively maintained so maybe going the plain enum would be better, depending on the timeline for the next major version


This comment has been minimized.


Keats commented Aug 1, 2018

Looks like some of Failure is coming to Std so it would be better to wait before making a breaking change:

@Keats Keats referenced this issue Sep 6, 2018


v1 release #331

5 of 14 tasks complete

@Keats Keats added the help wanted label Sep 21, 2018


This comment has been minimized.


Keats commented Nov 6, 2018

So the way to go is probably plain std Error enum since using failure would probably be a dead end as things get moved to std. I am not sure how to provide the same UX as with error-chain though where errors are chained pretty seamlessly to give the whole context.

Once we have it working, we can also add more error types like the ones from #322

@Keats Keats removed the help wanted label Nov 10, 2018

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