-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurred while retrieving the patient details: SyntaxError: "undefined" is not valid JSON #49
Comments
Did you solve it? I have the same issue, some say it is related to the Appwrite version that is being used but I tried to upgrade to 13.0.0 and still get the same |
I am also getting the same error.The query option is not working |
hi, I was getting the same issue. The error is in the patient get server action. If you console log the patient data it is not fetching anything from the backend so instead of creating the appointment it is running the update appointment code for which it is asking for document Id. To resolve this you need to get the patient detail first. For this you need to update the node appwrite dependency to the latest version, it will solve the issue. |
"use server"; import { ID, InputFile, Query } from "node-appwrite"; import { // CREATE APPWRITE USER
} catch (error: any) {
} // GET USER
} catch (error) { // REGISTER PATIENT
} catch (error) { // GET PATIENT // Log for debugging try {
} catch (error) { |
Downgrade the node-appwrite version to 12.0.1 and edit this part of the code that I have given |
Downgrade the node-appwrite version to 12.0.1 and edit this part of the code that I have given 'use server'; import { ID, Query, InputFile } from "node-appwrite";
} catch (error: any) {
} export const getUser = async (userId: string) => {
} catch (error) { export const registerPatient = async ({ identificationDocument, ...patient }: RegisterUserParams) => {
} catch (error) { |
The error is sometimes happen due to when first time registering the user: |
i get redirected to regestration page but nothing happens
The text was updated successfully, but these errors were encountered: