Module: Grape::Parser::Xml
- Defined in:
- lib/grape/parser/xml.rb
Class Method Summary collapse
Class Method Details
.call(object, _env) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/grape/parser/xml.rb', line 7 def call(object, _env) ::Grape::Xml.parse(object) rescue ::Grape::Xml::ParseError # handle XML parsing errors via the rescue handlers or provide error message raise Grape::Exceptions::InvalidMessageBody.new('application/xml') end |