Skip to content

Conversation

hafeezhmha
Copy link

This addresses the runtime error "Cannot read properties of null (reading 'conversation_id')" that occurs when the API call fails and returns null.
Changes made:
Added null check after the initial API call in the useEffect hook
Added null check in the handleSendMessage function before accessing data properties
These changes prevent the application from crashing when the backend API is unavailable or returns an error response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant