Attempt to create a session with no SessionID when calling variable1.
The request doesn't contains a SessionID but the endpoint attempts to create a session.
Correct your code
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.