Skip to content

fix: some gallery images do not render #828

@alexgoff

Description

@alexgoff

Example: https://rubinobservatory.org/gallery/collections/main-gallery/fk0r17r6i107v0gsq822qd7d1o

Since the CantoDamAssetInterface is not picked up by our type generator, Canto assets are typed by creating a manual schema. Some gallery assets are missing pieces of data expected by the schema validator, causing the page not to render. This is likely because a piece of data that is actually optional or nullable, has been marked as required,

Identify the missing pieces of data by logging the error from the Zod schema validator, and update the schema to mark them as optional or nullable.

Additionally, throw the Zod error so it can be picked up by cloud logging and display a render error instead of a notFound page

Edit original issue resolved, hold this ticket for a while in case it comes up again

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions