You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marat Radchenko <sl...@gmail.com> on 2009/12/02 12:18:55 UTC

InvalidUrlException considered evil?

There some places in Wicket sources where it throws
InvalidUrlException that causes exception logging and
InternalErrorPage is shown.

However, I don't agree that badly constructed URL is and _internal_
error. It is external error (for example, user was playing with urls,
modifying them by hand).

So, my proposal: stop treating invalid urls and internal errors, don't
log traces for them, don't show InternalErrorPage. Instead, either
redirect user to home page, or show him 404, or show him 400 (bad
request), or whatever else.

The main point: do _not_ log errors just because user passed us an url
that we couldn't resolve to a page/component.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: InvalidUrlException considered evil?

Posted by Alex Objelean <al...@yahoo.com>.
That is why this Exception was created... you can override requestCycle &
handle this kind of exception whatever you like ...

Alex Objelean


Marat Radchenko-2 wrote:
> 
> There some places in Wicket sources where it throws
> InvalidUrlException that causes exception logging and
> InternalErrorPage is shown.
> 
> However, I don't agree that badly constructed URL is and _internal_
> error. It is external error (for example, user was playing with urls,
> modifying them by hand).
> 
> So, my proposal: stop treating invalid urls and internal errors, don't
> log traces for them, don't show InternalErrorPage. Instead, either
> redirect user to home page, or show him 404, or show him 400 (bad
> request), or whatever else.
> 
> The main point: do _not_ log errors just because user passed us an url
> that we couldn't resolve to a page/component.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/InvalidUrlException-considered-evil--tp26607291p26635840.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: InvalidUrlException considered evil?

Posted by Marat Radchenko <sl...@gmail.com>.
2009/12/2 Ilja Pavkovic <il...@binaere-bauten.de>:
> Am Mittwoch, 2. Dezember 2009 12:18:55 schrieb Marat Radchenko:
>> There some places in Wicket sources where it throws
>> InvalidUrlException that causes exception logging and
>> InternalErrorPage is shown.
>>
>> However, I don't agree that badly constructed URL is and _internal_
>> error. It is external error (for example, user was playing with urls,
>> modifying them by hand).
>>
>> So, my proposal: stop treating invalid urls and internal errors, don't
>> log traces for them, don't show InternalErrorPage. Instead, either
>> redirect user to home page, or show him 404, or show him 400 (bad
>> request), or whatever else.
>>
>> The main point: do _not_ log errors just because user passed us an url
>> that we couldn't resolve to a page/component.
> Hi, I have a slightly different proposal:
> - log errors for invalid urls in development mode only
> - log warnings for invalid urls in deployment mode
I'd be even more remissive: warning in development mode, silence in
deployment mode.

You don't log errors/warnings when user hits nonexisting url, do you?
That's similar - he passed us an url that couldn't be resolved to a
page. I don't see how it is different from url that resolved to a
page, but couldn't be resolved to component on it.

> Best Regards,
>        Ilja
>
> --
> binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin
>
>   +49 · 171 · 9342 465
>
> Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
> Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: InvalidUrlException considered evil?

Posted by Ilja Pavkovic <il...@binaere-bauten.de>.
Am Mittwoch, 2. Dezember 2009 12:18:55 schrieb Marat Radchenko:
> There some places in Wicket sources where it throws
> InvalidUrlException that causes exception logging and
> InternalErrorPage is shown.
> 
> However, I don't agree that badly constructed URL is and _internal_
> error. It is external error (for example, user was playing with urls,
> modifying them by hand).
> 
> So, my proposal: stop treating invalid urls and internal errors, don't
> log traces for them, don't show InternalErrorPage. Instead, either
> redirect user to home page, or show him 404, or show him 400 (bad
> request), or whatever else.
> 
> The main point: do _not_ log errors just because user passed us an url
> that we couldn't resolve to a page/component.
Hi, I have a slightly different proposal:
- log errors for invalid urls in development mode only
- log warnings for invalid urls in deployment mode

Best Regards,
	Ilja

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: InvalidUrlException considered evil?

Posted by Marat Radchenko <sl...@gmail.com>.
Same applies to "org.apache.wicket.WicketRuntimeException: unable to
find component with path ... on stateless page ..." that can also be
triggered by badly constructed url.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org