Him I’m new to Parse library. Please help me i got a error of 141 with message of “Cannot read property ‘success’ of undefined”. Please see attachment
here the code
Him I’m new to Parse library. Please help me i got a error of 141 with message of “Cannot read property ‘success’ of undefined”. Please see attachment
here the code
Can you share your cloud code?
I have no cloud code. All I have a cloud function name.
You are calling a cloud function with the name of getTextLists
. And you defined that cloud function with Parse.Cloud.define
right? Can you share that code?
I’m working in an organization as a frontend developer. They give me just cloud function name (‘getTextLists’) and say integrate in to client side. I just confirm that this error is from my side or from backend side(backend mean where this function define with parse).
Ok that makes sense. Seems like error is thrown in backend. I assume that they are using Parse server v3 or higher but their cloud code syntax is for v2.
in V3 and higher cloud code is defined like this
Parse.Cloud.define('gettextLists', (request) => {
//And you just return the reponse you wanna send
return 'hello world';
});
But in v2 cloud code takes two parameter
Parse.Cloud.define('getTextLists', (request, response) => {
//İf you want to return something you call response.success
response.success('Hello World');
})
This is old syntax and it doesnt work. Since cloud code only gets one parameter now (request) response is undefined and calling undefined.success throws the error.
This is just my guess. Long story short error is from backend.
Make sense. Thanks for help
What could be the best strategy to resolve this issue from from frontend. Is it possible?
No. You can’t manipulate backend from frontend. If you can, you have bigger problems than this.
Thanks , that make sense…