OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
190 stars 87 forks source link

If export not enabled (i.e. trial instances), the generic export failure message can be misleading #1617

Open steventlamb opened 10 years ago

steventlamb commented 10 years ago

It'll say "An error has occurred, please try again later."

Due to the way our decorators are structured, there's no easy way (think writer monads) to pass the information down to the view itself, which is capable of returning JSON with an error message.

jwalgran commented 10 years ago

Is the solution simply disabling the links when exporting is not available?

steventlamb commented 10 years ago

Probably. It would lead to a little bit of duplication, because we'll also be checking of the feature is enabled on the endpoint as well, but that's fine. Fits the pattern of checking perms once for UI reasons, and again for server actions.