# How to manage errors in ARes?

**URL:** <https://www.ruby-forum.com/t/how-to-manage-errors-in-ares/108834>\
**Category:** Rails\
**Created:** [July 7, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/how-to-manage-errors-in-ares/108834 "2007-07-07T22:50:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [July 7, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/how-to-manage-errors-in-ares/108834/1 "2007-07-07T22:50:32Z")

</div>

how to manage errors in ARes?  
Hey all,

I have that function:

def create  
@profile = Profile.new(params[:profile])

```
respond_to do |format|
  if @profile.save
    flash[:notice] = 'Profile was successfully created.'
    format.html { redirect_to profile_url(@profile) }
    format.xml { head :created, :location => profile_url(@profile) 

```

}  
else  
format.html { render :action =\> “new” }  
format.xml { render :xml =\> @profile.errors.to\_xml }  
end  
end  
end

Now when I create a profile from ARes with wrong information, I don’t  
get the same error I would get normally. I only get some http errors,  
not the activeRecord ones, isn’t @profile.errors.to\_xml supposed to  
send me the ActiveRecord errors? if yes, how can I get that errors.xml  
then?

Thanx in advance

Pat
