Open TranPhu45 opened 2 weeks ago
when you are creating database in appwrite . In patient collection when you are selecting enum for gender see to it that you capitalize the first letter like Male,Female , Other option is in constant file just make the first letter small
An error occurred while retrieving the patient details: SyntaxError: "undefined" is not valid JSON at JSON.parse ()
at parseStringify (webpack-internal:///(rsc)/./lib/utils.ts:17:38)
at $$ACTION_3 (webpack-internal:///(rsc)/./lib/actions/patient.actions.ts:85:70)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Register (webpack-internal:///(rsc)/./app/patients/[userId]/register/page.tsx:31:21)
GET /patients/66fd04f9003d1c1b2a51/register?_rsc=lzpiz 200 in 1339ms
An error occurred while creating a new patient: AppwriteException [Error]: Invalid document structure: Attribute "gender" has invalid format. Value must be one of (male, female, other)
at Client.call (webpack-internal:///(rsc)/./node_modules/node-appwrite/lib/client.js:206:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Databases.createDocument (webpack-internal:///(rsc)/./node_modules/node-appwrite/lib/services/databases.js:1711:16)
at async $$ACTION_2 (webpack-internal:///(rsc)/./lib/actions/patient.actions.ts:66:28)
at async C:\Users\Admin\PycharmProjects\PatientManagementSystem\healthcare\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:418
code: 400,
type: 'document_invalid_structure',
response: {
message: 'Invalid document structure: Attribute "gender" has invalid format. Value must be one of (male, female, other)',
code: 400,
type: 'document_invalid_structure',
version: '1.6.0'
}
}
POST /patients/66fd04f9003d1c1b2a51/register 200 in 1731ms