Method Security

Hi folks,

I'm using method security to lock down the HTTP method used on particular handler actions. Occasionally I see errors in logbox that indicate that incorrect HTTP methods are used. Can anyone reccomend how to get access to this info further up in the request in order to do a proper redirect or display an error message? I'd like to trap this in an aroundHandler, preHandler or Interceptor rather than having the Main.onException fire.

Thanks much.

Nolan

I believe the localized onError convention should work?

Yes but is it possible to trap the error further up in an interceptor or arroundHandler?

Nolan Dubeau

Load *.*,8,1

around handler no because the http method is checked before method execution. So you have two choices.

  1. onError() convention in the handler
  2. onException or exception handler

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

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

Social: twitter.com/lmajano facebook.com/lmajano

Okay thanks. Is there a coldbox method I can call to detect this error in the onError or would I just have to evaluate the exception?

Nolan Dubeau

Load .,8,1