Open DevSagarKumarJha opened 6 months ago
As we are getting message array from the db using pipeline instead of User not found we can give message: message not found error
if (!userMessages || userMessages.length === 0) { return Response.json( { success: true, message: "No Messages" }, { status: 200 } ) }
this worked for me