Skip to content

Conversation

@viraptor
Copy link

Helpers give one-line options for the typical use case: parse the parameters or 400, get required parameter or 400. No existing functionality is changed.

doctest are disabled in Cargo.toml to allow partial examples in the docs.

@untitaker
Copy link
Member

Hello @viraptor, I'd prefer if those helpers were methods on a trait that is impl'd for QueryMap.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might be able to avoid these extra functions if we impl Into<IronError> for our own error types?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally speaking I think it's wrong to do so - you want to specify an intelligent and semantic response when there is an error, not just toss 400 at everything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of those helpers is IMO that I don't care about that.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants