The tableName parameter was being fetched from 'req.body', but the callback URL was sending it as a query parameter. This caused the function to fail in identifying the correct table name during execution. The code has been updated to retrieve it using req.query.tableName to ensure proper handling of query parameters.
Fix:-
Changed the code to use 'req.query.tableName' instead of 'req.body.tableName'