Currently, with DocumentDB instead of a friendly error like "Value must be unique" we see a generic "Something went wrong" message. This PR fixes that by adding a fallback to parse the message instead of using `error.keyValue` which doesn't exist for responses from DocumentDB.
Payload MongoDB Adapter
Official MongoDB adapter for Payload.
Installation
npm install @payloadcms/db-mongodb
Usage
import { buildConfig } from 'payload'
import { mongooseAdapter } from '@payloadcms/db-mongodb'
export default buildConfig({
db: mongooseAdapter({
url: process.env.DATABASE_URI,
}),
// ...rest of config
})
More detailed usage can be found in the Payload Docs.