bigcartel / dugway

Easily build and test Big Cartel themes.
https://developers.bigcartel.com/api/themes
MIT License
149 stars 22 forks source link

Show more useful error message on invalid store subdomain #99

Closed mattwigham closed 2 years ago

mattwigham commented 10 years ago

If you specify a store subdomain in the config.ru that doesn't exist, the error reported in the browser is:

NoMethodError: undefined method `[]' for nil:NilClass
~/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/dugway-0.8.3/lib/dugway/store.rb:120:in `currency'
~/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/dugway-0.8.3/lib/dugway/store.rb:124:in `locale'
~/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/dugway-0.8.3/lib/dugway.rb:35:in `application'

It'd be much more useful if it was something like:

sample.bigcartel.com doesn't exist, please update config.ru