[Zope] How to change Unauthorized error message?

jensebaer jensebaer@hotmail.com
Thu, 28 Sep 2000 19:00:11 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C0297E.54097D20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,
I want to give out another error message (not the standard error =
message) when logging was without success.

         Zope Error
      Zope has encountered an error while publishing this resource.=20

      Unauthorized

      You are not authorized to access this resource.=20
      No Authorization header found.=20

Traceback (innermost last):
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line =
214, in publish_module
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line =
179, in publish
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line =
151, in publish
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/BaseRequest.py, =
line 446, in traverse
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/HTTPResponse.py, =
line 551, in unauthorized
Unauthorized: (see above)



-------------------------------------------------------------------------=
-

      Troubleshooting Suggestions

        a.. The URL may be incorrect.=20
        b.. The parameters passed to this resource may be incorrect.=20
        c.. A resource that this resource relies on may be encountering =
an error.=20
      For more detailed information about the error, please refer to the =
HTML source for this page.=20

      If the error persists please contact the site maintainer. Thank =
you for your patience.=20
    =20


how can I mange this.
I tryed it with the standard_error_message:

<dtml-if "error_type =3D=3D 'Unauthorized'">
  <dtml-return standard_Unauthorized_html>
</dtml-if>

but that doesen=B4t work.


Any ideas?

Jens




------=_NextPart_000_000A_01C0297E.54097D20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I&nbsp;want to give out another error=20
message&nbsp;(not the standard error message) when logging was without=20
success.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<TABLE border=3D0 width=3D"100%">
  <TBODY>
  <TR vAlign=3Dtop>
    <TD align=3Dmiddle width=3D"10%">&nbsp; </TD>
    <TD width=3D"90%">
      <H2>Zope Error</H2>
      <P>Zope has encountered an error while publishing this resource. =
</P>
      <P><STRONG>Unauthorized</STRONG></P><STRONG>You are not authorized =
to=20
      access this resource.</STRONG>=20
      <P>No Authorization header found. <PRE>Traceback (innermost last):
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line =
214, in publish_module
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line =
179, in publish
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line =
151, in publish
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/BaseRequest.py, =
line 446, in traverse
  File /home/zope/Zope-2.1.6-src/lib/python/ZPublisher/HTTPResponse.py, =
line 551, in unauthorized
Unauthorized: (see above)

</PRE>
      <HR noShade>

      <P>Troubleshooting Suggestions</P>
      <UL>
        <LI>The URL may be incorrect.=20
        <LI>The parameters passed to this resource may be incorrect.=20
        <LI>A resource that this resource relies on may be encountering =
an=20
        error. </LI></UL>
      <P>For more detailed information about the error, please refer to =
the HTML=20
      source for this page. </P>
      <P>If the error persists please contact the site maintainer. Thank =
you for=20
      your patience. </P></TD></TR></TBODY></TABLE></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>how can I mange this.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I tryed it with the=20
standard_error_message:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-if "error_type =3D=3D=20
'Unauthorized'"&gt;<BR>&nbsp; &lt;dtml-return=20
standard_Unauthorized_html&gt;<BR>&lt;/dtml-if&gt;<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>but that doesen=B4t work.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any ideas?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Jens</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_000A_01C0297E.54097D20--