Skip to content

PostgreSQL API writes fail when JSON contains U+0000 #30955

Description

@harshach

Description

Creating or updating metadata whose serialized JSON contains the Unicode NUL character (U+0000, encoded as \u0000) fails on PostgreSQL when the payload is cast to jsonb. The observed Topic case places the character in messageSchema.schemaFields[].description, but the same persistence boundary is shared by other entity and specialized JSON APIs.

Steps to reproduce

  1. Use PostgreSQL as the OpenMetadata database.
  2. Create a Topic whose nested schema-field description contains \u0000.
  3. Observe an HTTP 500 caused by ERROR: unsupported Unicode escape sequence; DETAIL: \u0000 cannot be converted to text while inserting topic_entity.json.

Expected behavior

The API write succeeds and removes the unsupported NUL character consistently before JSON reaches database storage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    In Review / QA 👀

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions