# Rescuing REXML::ParseException

**URL:** <https://www.ruby-forum.com/t/rescuing-rexml-parseexception/139751>\
**Category:** Rails\
**Created:** [June 6, 2008, 6:28pm UTC](https://www.ruby-forum.com/t/rescuing-rexml-parseexception/139751 "2008-06-06T18:28:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jney](https://www.ruby-forum.com/u/jney)\
**Post date:** [June 6, 2008, 6:28pm UTC](https://www.ruby-forum.com/t/rescuing-rexml-parseexception/139751/1 "2008-06-06T18:28:52Z")

</div>

i try to rescue REXML::ParseException in rescue\_action\_in\_public but  
nothing works always a “[Stat.us](http://Stat.us): 500 Internal Server Error”.

here is the command i pass to test it:  
curl -H ‘Content-Type: application/xml’ -H “Accept: text/xml” -d  
'kjkljsldkj\</not\_a\_good\_tag\_end\>'[http://localhost:3000/messages](http://localhost:3000/messages)

Any idea how to handle this kind of error?
