The module provides a Condition plugin for blocks, checking the status code for 40x range of client errors.

Use this to place a block using a Condition plugin to check the HTTP client error status code.

eg display a block on a 403 or 404 page.

Version 1.x is only for Drupal 8.
Version 2.x introduces Drupal 9 compatibility (so Drupal versions 8.7.7+).

Project link

https://www.drupal.org/project/http_client_error_status

Git instructions

git clone --branch 8.x-2.x https://git.drupalcode.org/project/http_client_error_status.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-http_client_er...

Comments

jefflogan created an issue. See original summary.

shaktik’s picture

Review of the 8.x-2.x branch (commit b75e6a0):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: ...viewsh/pareview_temp/tests/src/Functional/BlockConditionPageTest.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    --------------------------------------------------------------------------
     53 | WARNING | [x] A comma should follow the last multiline array item.
        |         |     Found: 1
     54 | WARNING | [x] A comma should follow the last multiline array item.
        |         |     Found: ]
     55 | WARNING | [x] A comma should follow the last multiline array item.
        |         |     Found: ]
    --------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------
    
    Time: 659ms; Memory: 4Mb
    

This automated report was generated with PAReview.sh, your friendly project application review script.

jefflogan’s picture

Thank you, I have fixed this after re-reading the coding standards. I never knew about this coding standard for arrays!

avpaderno’s picture

Issue summary: View changes
klausi’s picture

Status: Needs review » Fixed

All looking good to me after a code review.

Thanks for your contribution, Jeff!

I updated your account so you can opt into security advisory coverage now.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.