Project

General

Profile

Actions

Defect #22069

closed

500 internal error while creating user with api by json request

Added by Vitaly Margelov about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

After my .NET Redmine library threw an exception stating that create user request returned 500 error, I figured out, that I can't create user using JSON, only using by XML request.
I've been taking request examples from here [[http://www.redmine.org/projects/redmine/wiki/Rest_Users]]
I get internal server error every time I use JSON for my requests, but XML ones are successful. Here is log message:

@Started POST "/redmine/users.json" for at 2016-02-17 09:53:47 -0800
Processing by UsersController#create as JSON
Current user: admin (id=1)
Completed 500 Internal Server Error in 18.0ms

NoMethodError (undefined method `[]' for nil:NilClass):
app/controllers/users_controller.rb:90:in `create'@

We've been testing it on versions 2.6.9-4 and 3.1.2-0. Same error on each. We've used Bitnami to deploy Redmine and apps.

Actions #1

Updated by Toshi MARUYAMA about 8 years ago

  • Status changed from New to Closed

Please use forum for questions.
Test passes.
source:tags/3.1.2/test/integration/api_test/users_test.rb#L153

Actions

Also available in: Atom PDF