# Trap "We're sorry..." errors

**URL:** <https://www.ruby-forum.com/t/trap-were-sorry-errors/120336>\
**Category:** Rails\
**Created:** [November 15, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/trap-were-sorry-errors/120336 "2007-11-15T22:16:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zakifataya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c89c15/32.png) [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Post date:** [November 15, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/trap-were-sorry-errors/120336/1 "2007-11-15T22:16:09Z")

</div>

In my production app, I occasionally get the “We’re sorry…” error  
screen. But in most (if not all) cases, there is no corresponding error  
in the logs. This makes it difficult to track down bugs.

It seems that what’s happening is that certain errors are either so  
fundamental, or happen so early in the response process, that they don’t  
hit the logs.

My question is, is there any way to trap information whenever Rails  
displays that error screen?

---

<div class="post-metadata">

**Author:** ![zakifataya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c89c15/32.png) [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Post date:** [November 15, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/trap-were-sorry-errors/120336/2 "2007-11-15T22:21:02Z")

</div>

On Nov 15, 2007 3:16 PM, Brian A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> displays that error screen?  
> config.log\_level = :debug

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![zakifataya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c89c15/32.png) [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Post date:** [November 15, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/trap-were-sorry-errors/120336/3 "2007-11-15T22:39:29Z")

</div>

Greg D. wrote:

> On Nov 15, 2007 3:16 PM, Brian A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > displays that error screen?  
> > config.log\_level = :debug
> 
> –  
> Greg D.  
> [http://destiney.com/](http://destiney.com/)

Thanks for the rapid response.

But doesn’t “debug” want to log everything (like SQL queries)? I just  
want to log some info whenever Rails throws an error.
