invalidEvent not in rc for onInvalidEvent event handler?

I'm on ColdBox 3.0.0 Beta 3 and have the following setting in my
ColdBox XML file:

    <Setting name="onInvalidEvent" value="Sorry.pageNotFound"/>

In Sorry.pageNotFound(), I expected to be able to access the invalid
event key but it's missing:

  public void function pageNotFound( any event ) {

    var rc = event.getCollection();

    createObject( 'java', 'java.lang.System' ).out.println( 'I handled
an invalid event!' );
    // rc.invalidevent ought to be present but doesn't seem to be...
    createObject( 'java', 'java.lang.System' ).out.println( 'Event: ' &
rc.invalidEvent );

  }

It looks like HandlerService.cfc should put the runnable event name
into that event key in one place but not in a later place:

lines 133-137:
          //Place invalid event in request context.
          oRequestContext.setValue
("invalidevent",oEventHandlerBean.getRunnable());

          // Relocate to Invalid Event, with collection persistance
          controller.setNextEvent(event=controller.getSetting
("onInvalidEvent"),persist="invalidevent");

lines 249-259:
    // If onInvalidEvent is registered, use it
    if ( len(trim(onInvalidEvent)) ){
      // Test for invalid Event Error
      if ( compareNoCase(onInvalidEvent,event) eq 0 ){
        getUtil().throwit(message="The onInvalid event is also invalid",
                  detail="The onInvalidEvent setting is also invalid:
#onInvalidEvent#. Please check your settings",
                  type="HandlerService.onInValidEventSettingException");
      }
      // Relocate to Invalid Event
      controller.setNextEvent(event=onInvalidEvent);
    }

Is there a reason for this difference or is it just a bug?

Sean

Hi Sean

The differences are that the onInvalidEvent should not redirect, this was like that in 2.6.3, but updated in 3.0.0 B2, in order to test some other stuff. The right behavior is that it does NOT relocate, it masks the incoming event and displays the invalid event as the main event.

This is my last ticket for Milestone 4.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Ah, cool, because the other issue I ran into is that when you have an
onInvalidEvent handler, you get a 302 for an invalid event where you
really want a 404 (or at least the option to return 404). Glad to hear
that will get fixed. Thank you.