koopjs / koop-socrata

Socrata provider for Koop.
Other
8 stars 7 forks source link

show a handy message when calling ./socrata/ if no instances have been registered #5

Closed jgravois closed 9 years ago

jgravois commented 9 years ago

i got myself kind of confused today before realizing a SQL error was to be expected when calling koop/socrata prior to registering an actual datastore.

it would be worthwhile to trap this error and display an informative message. please assign this enhancement to me. i think i can handle implementing the code change here

chelm commented 9 years ago

@jgravois Yes I actually do this in the agol provider and just didn't get around to getting it into Socrata.

I think it'd be best to actually trap the error in the find method on the model like it's been done here: https://github.com/Esri/koop-agol/blob/master/models/agol.js#L38 - does that make sense?

The find method in the Socrata model is here: https://github.com/chelm/koop-socrata/blob/master/models/Socrata.js#L27

jgravois commented 9 years ago

thanks for the recommendation. PR submitted. closing this issue.

chelm commented 9 years ago

COOL!