stargate / data-api

JSON document API for Apache Cassandra (formerly known as JSON API)
https://stargate.io
Apache License 2.0
14 stars 16 forks source link

Empty `options` object in various new commands errors #1658

Closed toptobes closed 2 weeks ago

toptobes commented 2 weeks ago

For example, sending an empty options object in createTable causes a 500 due to an internal NPE:

{"errors":[{"message":"Server failed: root cause: (java.lang.NullPointerException) Cannot invoke \"java.lang.Boolean.booleanValue()\" because the return value of \"io.stargate.sgv2.jsonapi.api.model.command.impl.CreateTableCommand$Options.ifNotExists()\" is null","errorCode":"SERVER_UNHANDLED_ERROR"}]}

dropTable & dropIndex are known to have the same issues as well, wouldn't be unlikely more commands also have the same issue