Add functionName to invalid function error (#2963)
Currently in the logs if an invalid function is called the error message just says "invalid function" which is decidedly unhelpful when looking through server logs. Now it will say "Invalid function: "functionName""
This commit is contained in:
committed by
Florent Vilmart
parent
4a2f7ff2db
commit
94178df4d2
@@ -161,7 +161,7 @@ export class FunctionsRouter extends PromiseRouter {
|
||||
theFunction(request, response);
|
||||
});
|
||||
} else {
|
||||
throw new Parse.Error(Parse.Error.SCRIPT_FAILED, 'Invalid function.');
|
||||
throw new Parse.Error(Parse.Error.SCRIPT_FAILED, `Invalid function: "${functionName}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user