Skip to content

Conversation

@ManakRaj-7
Copy link

Fixes #5392

Problem

ListMemos can fail with: grpc: error while marshaling: string field contains invalid UTF-8 when stored memo content or derived snippet contains invalid UTF-8 data.

This causes the entire API response to fail during protobuf marshaling.

Solution

Add defensive UTF-8 validation in convertMemoFromStore before constructing protobuf responses.

If invalid UTF-8 is detected:

  • The request fails fast with a clear INTERNAL error
  • The affected memo UID is included in the error message
  • No user data is modified

Scope

  • Backend only
  • No API contract changes
  • No data mutation
  • No frontend changes

Notes

This is a diagnostic-first fix to improve API stability and observability.

Add defensive UTF-8 validation in convertMemoFromStore to prevent gRPC marshal failures when memo content or derived snippet contains invalid UTF-8 data. This fails fast with a clear INTERNAL error instead of crashing the Listen response.

Signed-off-by: Manak Raj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant