#Mongoose-adapter CosmosDB error

11 messages · Page 1 of 1 (latest)

mossy sundial
#

Hi,

We're trying to use Azure CosmoDB (the mongo adapted variant) as our db for payload.

Any invocation of a relation in the admin UI gives the following kind of error:

[12:48:34] ERROR (payload): MongoServerError: Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: xxx-xxx-xxx-xxx; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: xxx-xxx-xxx-xxx; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: xxx-xxx-xxx-xxx; Reason: (Message: {"Errors":["The index path corresponding to the specified order-by item is excluded."]} ActivityId: xxx-xxx-xxx-xxx, Request URI: /apps/xxx-xxx-xxx-xxx/services/xxx-xxx-xxx-xxx/partitions/xxx-xxx-xxx-xxx/replicas/xxx-xxx-xxx-xxx/, RequestStats: Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, SDK: Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0);););;

indexSortableFields: true, in the configuration does not make a difference.

steady shadowBOT
mossy sundial
#

Correction, not all relationships, only the ones that applies som kind of sorting, ie in a select.

mental lantern
#

Is there any workaround? I.e. removing the sorting functionality for now

mossy sundial
#

@mental lantern The only workaround I've found so far is to disable versioning for the collection I'm working with. It's fine for now since I'm only POC:ing, but it would be nice to have before going further with payload 😅

mental lantern
#

I also get this issue when versioning is not enabled, It's not enabled by default right?

mossy sundial
#

I don't think it is, no

#

It started working when i removed versions: { drafts: true, }

mental lantern
#

Okay, I don't even have drafts on my collections 😦