You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@shindig.apache.org by so...@web.de on 2011/03/24 09:48:29 UTC

Customizing Shindig (example: Errors)

  
Hi,

I would like to use shindig as base for our open social project and I’m currently stuck on the following question:

Is it possible to customize shindig errors? For example localize them and add error icons and such things?
 
I want to use shindig in an existing portal and we have to have a layout that meets our needs. I asked about customizing the client side container (samplecontainer) before on that list and got the information that we have to rewrite it. We can do that but the rendering calls to ... /gadgets/ifr?.... are another cup of coffee.
At the moment I get a plain white response page with the exception text in simple black (englisch). For example: “Unable to retrieve spec for http://server1.test:8080/opensocial/getGadget.do?gadget =info. HTTP error 504”. I would need to change that. Is this possible? 

Thanks
Tom

___________________________________________________________
NEU: FreePhone - kostenlos mobil telefonieren und surfen!				
Jetzt informieren: http://produkte.web.de/go/webdefreephone

Re: Customizing Shindig (example: Errors)

Posted by Paul Lindner <li...@inuus.com>.
For some of the errors this should be possible to fix.  For example your
error message is thrown like this:

      throw new
GadgetException(GadgetException.Code.FAILED_TO_RETRIEVE_CONTENT,
                                "Unable to retrieve spec for " +
query.specUri + ". HTTP error " +
                                response.getHttpStatusCode(),
                                retcode);

Note the GadgetException.Code enum.

You could then modify ServletUtil#errorResponse to include a method of
returning localized error messages based on that enum.

Lucky for you most of the error handling is centralized in this way.


On Thu, Mar 24, 2011 at 1:48 AM, <so...@web.de> wrote:

>
>
> Hi,
>
> I would like to use shindig as base for our open social project and I’m
> currently stuck on the following question:
>
> Is it possible to customize shindig errors? For example localize them and
> add error icons and such things?
>
> I want to use shindig in an existing portal and we have to have a layout
> that meets our needs. I asked about customizing the client side container
> (samplecontainer) before on that list and got the information that we have
> to rewrite it. We can do that but the rendering calls to ...
> /gadgets/ifr?.... are another cup of coffee.
> At the moment I get a plain white response page with the exception text in
> simple black (englisch). For example: “Unable to retrieve spec for
> http://server1.test:8080/opensocial/getGadget.do?gadget =info. HTTP error
> 504”. I would need to change that. Is this possible?
>
> Thanks
> Tom
>
> ___________________________________________________________
> NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> Jetzt informieren: http://produkte.web.de/go/webdefreephone
>



-- 
Paul Lindner -- lindner@inuus.com -- linkedin.com/in/plindner