Defect #20673

Redmine REST API gives WATCHDOG_CRITICAL on 404 errors

Added by Jamila Khan about 6 years ago. Updated about 6 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution:Invalid Affected version:

Description

Howdy,

tl;dr I propose the Redmine REST API should give a lower WATCHDOG error level on 404 errors, and I can submit the patch if desired.

My company has been happily using redmine for a few years now. We have recently started using the redmine_rest_api module via our Drupal based IRC Chat Bot. I have set up a monitoring system that will notify me if there are any WATCHDOG_CRITICAL errors on our site. These things put together meant that if someone made a typo in our chat room when trying to call up information on a redmine ticket, my monitoring system would send me a message there there were critical errors on my website.

The relevant code is redmine_rest_api/redmine_rest_api.module, line 150

    if ($result->code == '404') {
      watchdog('redmine', t('The URL %url caused a 404 error from the service.', array('%url' => $url . '.' . $api_type . '?key=' . $api_key)), NULL, WATCHDOG_CRITICAL);
    }
    elseif ($result->code == '500') {
      watchdog('redmine', t('The URL %url caused a 500 internal server error at the service.', array('%url' => $url . '.' . $api_type . '?key=' . $api_key)), NULL, WATCHDOG_CRITICAL);
    }
    elseif ($result->code == '403') {
      watchdog('redmine', t('The URL %url was denied access with a 403 code by the service.', array('%url' => $url . '.' . $api_type . '?key=' . $api_key)), NULL, WATCHDOG_CRITICAL);
    }

I propose that the watchdog levels for those lines change to WATCHDOG_WARNING or WATCHDOG_ERROR.

Available Drupal watchdog levels: https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/watchdog/7
Drupal severity level guidelines: https://api.drupal.org/api/drupal/includes!bootstrap.inc/group/logging_severity_levels/7

History

#1 Updated by Jamila Khan about 6 years ago

  • Status changed from New to Resolved

Oops. Submitted this to the wrong development tracker. This is a drupal issue not a redmine issue. Sorry!

#2 Updated by Toshi MARUYAMA about 6 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Also available in: Atom PDF