The PR #16596 to fix issue #16594 did not update the error text when getblocktemplate is called without specifying the segwit rule, only the GBT example text. It's possible that this error message is where the user reporting the issue got the incorrect information from. Calling getblocktemplate without rules generates the following.
getblocktemplate must be called with the segwit rule set (call with {"rules": ["segwit"]}) (code -8)```
Using that example.
getblocktemplate {"rules": ["segwit"]}```
Generates the following error.
Error: Error parsing JSON:{rules:```
This commit updates the error text produced when calling getblocktemplate without the segwit rule to.
getblocktemplate must be called with the segwit rule set (call with '{"rules": ["segwit"]}') (code -8)```
Using that example the following call will work.
getblocktemplate '{"rules": ["segwit"]}'```