Hi,

I am writing an API providing data in different formats like xml and
json. Now when someone uses the api in a wrong way, I would like to
provide error-messages in the expected format. I created custom files
in /config/error/ directory and fire the exceptions like so:

$this->forward404('User is already activated');

What I get is that:

<error code="404" message="Not Found">
    <name>sfError404Exception</name>
    <message>User is already activated</message>
</error>

But when in productive environment, I get just this:

<error>
    <code>404</code>
    <message>Not Found</message>
</error>

Is there a way I can tell symfony to distinguish between sf exceptions
and my api exceptions, maybe by writing an error module handyling API-
errors? My main goal is to provide errors in productive environment
including custom http status and an error message.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to