<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 25, 2019 at 12:59 PM Sven Van Caekenberghe <<a href="mailto:sven@stfx.eu">sven@stfx.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 25 Nov 2019, at 16:50, Mariano Martinez Peck <<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>> wrote:<br>
> <br>
> <br>
> <br>
> On Mon, Nov 25, 2019 at 12:39 PM Sven Van Caekenberghe <<a href="mailto:sven@stfx.eu" target="_blank">sven@stfx.eu</a>> wrote:<br>
> Hi,<br>
> <br>
> I have my own WAHtmlHaltAndErrorHandler subclass that overrides #handleDefault: to log the error in various ways as well as email it. I also include some custom session information for context.<br>
> <br>
> However, I would also like to print all details of the original HTTP request (WARequest) to better map it to upstream requests, but I can't find how to access that. Any ideas ?<br>
> <br>
> <br>
> Hi Sven,<br>
> <br>
> I think I did not understand your question...but...just in case, can't you do a "WACurrentRequestContext value" inside the #ha ndleDefault: and get the WARequest? Then you can print whatever you want... <br>
<br>
Ah yes, now that you told me it is obvious. Thx.<br></blockquote><div><br></div><div>My pleasure :) </div><div> </div><div>BTW, in the VA Smalltalk version of Seaside, in response to a customer need, I adapted our Seaside adaptor to store the native request (SST in our case, Zinc in yours) in the request context. That way, it was very easy to add logging and be able to map from Seaside requests to native requests. Looks like long ago it was like that: <a href="https://github.com/SeasideSt/Seaside/issues/305">https://github.com/SeasideSt/Seaside/issues/305</a>  but not any longer.</div><div><br></div><div>What I did was something like this:</div><div><br></div><div>!WASstRequestConverter publicMethods !<br><br>contextFor: aNativeRequest<br>                "Answer a request context for aNativeRequest."<br><br>                ^(super contextFor: aNativeRequest)<br>                              propertyAt: #nativeRequest put: aNativeRequest;<br>                              yourself! !<br></div><div><br></div><div><br></div><div>Let me know if you want more details and I can share everything you want.</div><div><br></div><div>Best, </div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font color="#666666">Mariano Martinez Peck</font></div><div><div dir="ltr"><div dir="ltr"><font color="#666666">Email: <a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a></font></div><div dir="ltr"><font color="#666666">Twitter: @MartinezPeck</font></div><div dir="ltr"><font color="#666666">LinkedIn: <a href="https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/" target="_blank">www.linkedin.com/in/mariano-martinez-peck</a></font></div><div dir="ltr"><div dir="ltr"><font color="#666666">Blog: <a href="https://marianopeck.wordpress.com/" target="_blank">https://marianopeck.wordpress.com/</a></font></div></div></div></div></div></div></div></div></div></div></div></div>