Skip to content

CloudCode POST Returns error " { code: 141, message: 500 }" #2687

Closed
@pjainusr

Description

@pjainusr
  • Issue Description

I am using Parse hosting services now since parse.com is going to retire. Following cloudcode function when requested makes call to third party api for creating a record and returns json response with success or error

===== cloud code ======
Parse.Cloud.define("createCode", function(request, response) {

var baseEVUrl = "https://external.baseline.url.com";

var params = JSON.stringify({
  "createCodeRequest": {
        "User"         : "username",
        "Password"     : "password"
    }
  });

Parse.Cloud.httpRequest({
  url: baseEVUrl+"/getCode",
  method: 'POST',
  header:{
      'Content-Type': 'application/json'
  },
  body:params,
  success: function (httpResponse) {
      response.success(httpResponse.text);
  },
  error: function (httpResponse) {
      response.error(httpResponse.status);
    }
});

});

===== cloud code ends ======

I see error on cloud code request

========= Error =========
[object Object]
�[31merror�[39m: Error generating response. ParseError { code: 141, message: 500 } code=141, message=500
Error: {"code":141,"message":500} functionName=createCode, code=141, message=500, , user=undefined
Input: {}
�[31merror�[39m: Failed running cloud function createCode for user undefined with:

========= Error Msg Ends =========

Same code runs fine under cloudcode on Parse.com but not on n chef hosted parse ( .18 version latest )

any thought, what could be going wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions