Azure/azure-cosmosdb-js-server

Does Error accept one or two arguments?

Opened this issue · 0 comments

The uniqueConstraint sample trigger, on lines 47, 60, 69, 105, 115, 121, and 134, throws a new Error with two arguments - an error code and a message. Similarly, the sum sample stored procedure does the same thing on lines 32 and 33.

It appears that Error can only be thrown with a single (message) argument though - and all other samples just use a single argument.

Which is correct?