Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beforeSave trigger is returning parse exception code 141 instead of 142 after migrating cloud code to self hosted parse-server #1802

Closed
doctrineofvoid opened this issue May 16, 2016 · 2 comments

Comments

@doctrineofvoid
Copy link

I am running parse-server 2.2.9 locally, after migrating my cloud code, I've found that beforeSave trigger is returning 141 exception code (script error) instead of 142 (validation error).

To reproduce this just tried this trigger
Parse.Cloud.beforeSave("InfoRequest", function(request, response) {
console.log("validation error");
response.error();
});

@drew-gross
Copy link
Contributor

To help us debug this, can you include the exact request and response in Parse Server? (you can see this in the logs using VERBOSE=1 environment variable)

@doctrineofvoid
Copy link
Author

doctrineofvoid commented May 17, 2016

Hello @drew-gross, this is the log for this request:

verbose: POST /parse/classes/InfoRequest { host: '192.168.139.150:1343',
'x-parse-client-version': 'i1.12.0',
accept: '/',
'x-parse-session-token': 'r:efd8dbbdb46cb3fd839d3d46e338e9c5',
'x-parse-application-id': '4YJy1QKi1cF66u4BGmTx....................',
'x-parse-client-key': 'EGGpryEHktLGwJnufOBt....................',
'x-parse-installation-id': '953c35cf-abb2-4de9-8e25-50e8e7932b63',
'x-parse-os-version': '9.3.1 (13E238)',
'accept-language': 'en-us',
'accept-encoding': 'gzip, deflate',
'content-type': 'application/json; charset=utf-8',
'content-length': '306',
'user-agent': '%D8%A8%D8%B5%D8%B1%D9%84%D9%8A/5 CFNetwork/758.3.15 Darwin/15.4
.0',
connection: 'keep-alive',
'x-parse-app-build-version': '5',
'x-parse-app-display-version': '5' } {
"gender": "male",
"placeOfBirth": "Lebanon",
"professional_obj": {
"__type": "Pointer",
"className": "Professional",
"objectId": "CqOqCxDap1"
},
"appLanguage": "ar",
"maritalStatus": "married",
"dateOfBirthString": "09/22/1983",
"requestText": "",
"fullName": "savio founiss",
"requestType": "RequestType1",
"horoscope": "Virgo"
}
validation error
verbose: error: code=141, message=undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants