Forum: Ruby on Rails Truncated development log when using rescue_from

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Steve Y. (Guest)
on 2009-04-04 03:52
I'm noticing that my development.log messages are not showing the usual
complete logging per request/response when I am catching exceptions from
my controllers using rescue_from.  I was wondering if anyone has ever
encountered this issue before.  I'm using Rails 2.2.2.

Processing DomainsController#show to xml (for at 2009-04-03
16:41:38) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", "id"=>"test6",
  SQL (0.1ms)   SET SQL_AUTO_IS_NULL=0
  Account Columns (3.6ms)   SHOW FIELDS FROM `accounts`
  Domain Columns (1.8ms)   SHOW FIELDS FROM `domains`
  Domain Load (0.8ms)   SELECT * FROM `domains` WHERE
(`domains`.`domainname` = 'test6') LIMIT 1

I would expect to see a final confirmation of the HTTP status code, but
instead I see the above without it, but the correct 404 status code is
returned back to my client program.
Completed in 81ms (View: 0, DB: 2) | 404 Not Found

My rescue_from implementation:

class ApplicationController < ActionController::Base
  rescue_from InvalidDomainError, :with => :handle404NotFound

def handle404NotFound(e)
  render :xml => generateErrorXML(e.to_s), :status => 404

def generateErrorXML(error_str)
    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>

Thanks in advance,
This topic is locked and can not be replied to.