we receive this message in the frontend after a post request on a Server Code service function.
as far as we know this is the only service function that doesn’t work, other functions work fine.
Backendless encountered an error while handling the request. An internal trouble ticket with ID CE9C6A42-BA12-0433-FFEC-67D9F323EB00 has been created and we will be investigating the issue.
are you aware of the ticket?
what is causing it…
Thanks in advance.
AppId : 5FB0EA72-A363-4451-FFA5-A56F031D6600
function directory JS: services > UserBusiness.js > login(person)
/**
* @description login user
* @route POST /Login
* @param {Person} person
*/
test data:
{"phone": "+96111111111", "verificationCode": "33532"}
error:
500 - Backendless encountered an error while handling the request. An internal trouble ticket with ID 63035F82-F5F0-68D2-FF01-3161363D4200 has been created and we will be investigating the issue. java.util.concurrent.CompletionException: java.lang.StackOverflowError java.lang.RuntimeException: java.util.concurrent.CompletionException: java.lang.StackOverflowError at controllers.CustomServiceController.handleException(CustomServiceController.java:236) at controllers.CustomServiceController.lambda$invokeLocalServiceMethod$3(CustomServiceController.java:209) at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986) at
…
@Volodymyr_Ialovyi
okay thank you.
this is a better test input data:
{"phone": "+96111111111", "verificationCode": "33532", "token" : "cv_W8b7AQ3ueEooZNzrUwV:APA91bERK59GMBrMceTf9U6ngO_Nr0msnq3Q_UMIcQJTIMvLZeCRMfIJmjUT1x1TwMzs-oF5V7xeCjMuM_snzz0zlnr1a7EA1B6XH98AHoevqCaSO_yrI1xvpOxofYbWswNOzBpIMvuD"}
Hello @Hassan_Kanso
I assume the error is caused by the following lines:
if (driver[0] == null) {
user.person.upcomingRides = reserveRidesFound;
return user;
}
reserveRidesFound
= list of reserve
(reserve has relation to person) => this way circular relation are obtained - user.person.reserve.person.reserve.person.reserve.person.reserve.person…reserve.person
Regards,
Vladimir
1 Like