             if pwdExist
                 db.save @body, (err, res) ->
                     if err
-                        railway.logger.write "[Create] err: #{err}"
-                        send 500
+                        railway.logger.write "[createAccount] err: #{err}"
+                        send 50
                     else
                         send _id: res._id, 201
             else

action 'createAccount', ->
    @body = body
    body.docType = "Account"
    body.toString = toString "Account"
    encryptPassword (pwdExist, err) ->
        if err
            console.log "[createAccount] err: #{err}"

            callback false, new Error("master key and slave key don't exist")
    else
        callback false

toString = ->
    "[Account for model: #{@id}]"


# POST /accounts/password/
