Error 500 when trying to add an URI on /follow #661

Open
gregkare opened this Issue Sep 27, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@gregkare

It seems to be related to #314

I've just opened an issue on ostatus which seems to cause this. I now know ostatus identifiers look like email adresses and not URI, but it's what I first tried and thus got the error page. Only then did I actually read the examples just some pixels below the form.

I've set up rstat.us on my machine so I can give you a stacktrace:

NoMethodError in SubscriptionsController#create

undefined method `new' for URI:Module
Rails.root: /Users/user/code//rstat.us

Application Trace | Framework Trace | Full Trace
app/models/feed.rb:58:in `populate'
app/models/feed.rb:43:in `create_from_feed_data'
lib/finds_or_creates_feeds.rb:9:in `find_or_create'
app/models/feed.rb:38:in `find_or_create'
app/controllers/subscriptions_controller.rb:65:in `create'
Request

Parameters:

{"utf8"=>"✓",
 "authenticity_token"=>"VZdI1YR9CtfQOWRQ8FZCUkU/xEwfDR/RQe0AplHClQ4=",
 "subscribe_to"=>"http://example.net/lala"}

To reproduce the issue (happens in production as well) :

  • Login, go to /follow
  • Type an URI into the form, validate

There should probably be some JS validation on the form to avoid that regardless of the ostatus issue.

@carols10cents

This comment has been minimized.

Show comment Hide comment
@carols10cents

carols10cents Sep 27, 2012

Contributor

Yep, sounds like a bug. We should be liberal in what we accept, and at the very least not crash. Thank you for reporting the issue and taking the time to get the stack trace!!! ❤️ ❤️ ❤️

Contributor

carols10cents commented Sep 27, 2012

Yep, sounds like a bug. We should be liberal in what we accept, and at the very least not crash. Thank you for reporting the issue and taking the time to get the stack trace!!! ❤️ ❤️ ❤️

@Nakort

This comment has been minimized.

Show comment Hide comment
@Nakort

Nakort Oct 16, 2012

I am thinking this OStatus::Feed.from_url(url) should raise an exception giving an invalid URI .

Nakort commented Oct 16, 2012

I am thinking this OStatus::Feed.from_url(url) should raise an exception giving an invalid URI .

@carols10cents

This comment has been minimized.

Show comment Hide comment
@carols10cents

carols10cents Oct 20, 2012

Contributor

That sounds right, @Nakort.

Contributor

carols10cents commented Oct 20, 2012

That sounds right, @Nakort.

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