Skip to content

validateRecipeUrls throws TypeError on non-array steps #17

Description

@royalpinto007

Problem

for (const step of recipe.steps ?? []) on steps: {} throws TypeError: object is not iterable, escaping as an unhandled 500 (index.ts calls validation with no try/catch).

Where

src/guard.ts (validateRecipeUrls).

Acceptance

Add a failing test first asserting non-array steps return a "... must be an array" error string. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions