[SOLVED] Custom error page for 403 Exceptions not shown

Hi,

I’m trying to make error pages in our app a bit nicer and it works fine in general.
The only thing that’s not working is for 403 errors.

This is what we did and I don’t know why it wouldn’t work. Are 403 errors treated differently than e.g. 404 or 500 errors? Is anyone able to help me out with this?

Neos:
  Flow:
    error:
      exceptionHandler:
          renderingGroups:
            accessForbidden:
              matchingStatusCodes:
                - 403
              options:
                format: html
                templatePathAndFilename: 'resource://My.Package/Private/Templates/Error/Default.html'
                variables:
                  errorDescription: "Nope! You're not allowed to do this."
                  errorDetailedDescription: "You don't have the permissions needed to access this part of the system.<br>If you think this is an error, contact the responsible person that manages your account."

Thanks,
David

Found it myself: the Settings.yaml of networkteam/sentryclient introduces a renderingGroup called “accessDeniedExceptions” that is applied for 403 status codes and was taken into account before the Settings.yaml from my package.
After I’ve changed the name of my renderingGroup to “accessDeniedExceptions” it worked perfectly fine.

1 Like