Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Plugin "Redmine" returned an error. Invalid HTTP code (403)


Hi guys,

For one particular Project in TestRail, I’m getting the following error message whenever I try to push a defect to Redmine:

This is happening whether I use the global TestRail integration setup for Redmine, or if I configure the integration specifically for this Project.

All other Projects, irrespective of them using either a Project-specific Redmine integration or the global one, work as expected, and I’m able to push a defect directly to Redmine. It’s just this one Project that has the issue. The only thing we can think of is that this Project was created before the Redmine plugin/integration was configured.

Any thoughts?



Hi Neil,

Thanks for your posting. When you clear the project-specific settings (so the project would use the same global settings as your other projects), have you also unselected “Mantis” in the defect plugin configuration box? This would be important so that TestRail uses the global settings. If this doesn’t help, can you please email us a screenshot of both your Administration > Integration page as well as screenshots of the Integration page for one project that works, and a screenshot for the project in question to



Thanks Dennis. Screenshots sent.

And I’m definitely deselecting “Redmine” when switching back to trying to use the global Integration for the defective Project.

I should also add that I can add a defect from the Project, but am unable to push one.



I get this same error reported. It used to work for me before but now, it does not appear to function correctly. I always get the error: “Plugin “Redmine” returned an error. Invalid HTTP code (403)”

The logs display the following:
[RedmineException] Invalid HTTP code (422). Please check your user/password and that the API is enabled in Redmine.

File: /var/www/testrail/app/plugins/defects/Redmine.php
Line: 523
Status Code: 500
Host: mytestrail
Uri: /testrail/index.php?/defects/ajax_push (POST)

Browser: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; Tablet PC 2.0)
PHP: 5.3.10-1ubuntu3.6
Server: Linux 3.5.0-36-generic #57~precise1-Ubuntu SMP Thu Jun 20 18:21:09 UTC 2013 x86_64

status_id: 5
assignedto: 1
defects: 23
project_id: 1
test_ids: 12
_token: f24f4368d7e5d652e3197250631394c7
defect_subject: Failed test: Import test link test cases to testrail
defect_tracker: 1
defect_project: 1
defect_category: 1
defect_description: Test: Import test link test cases to testrail

at Redmine_api->_throw_error (Redmine.php:579)
at Redmine_api->_send_request (Redmine.php:535)
at Redmine_api->_send_command (Redmine.php:667)
at Redmine_api->add_issue (Redmine.php:382)
at Redmine_defect_plugin->push (defects.php:728)
at Defects_controller->ajax_push (controller.php:109)
at Controller->_invoke_web (controller.php:67)
at Controller->_invoke (gizmo.php:108)
at require_once (index.php:106)


Never mind! I resolved this issue myself. I had introduced a new ‘required’ customized field for a bug in Redmine. Since Testrails was not passing that field, testrails was throwing this error. Once I removed the required check, I no longer got the error. I now need to learn how to customize testrail’s ‘push’ to include my required customized field.

Redmine Integration - Getting Error Message whe 422 when attempting to use the Push command

Hello Joe,

Thanks for your posting. Yes, the 422 error you have in the logs is caused by a mandatory field in Redmine that is not submitted by TestRail. You can customize the Redmine defect plugin in TestRail to add support for additional fields and you can learn more about this:

We are also happy to help in case you have any questions!