Skip to content

Unhelpful error message output #3054

Description

@abea

Describe the bug

Running npx @redocly/cli build-docs on an openapi JSON file, I receive TypeError: u?.match is not a function. No stack trace. Presumably somewhere the CLI expects a string and isn't getting one, but I have no idea where to look to fix that.

I previously got the error Error: Invalid reference token: FundingCode. Again, no stack trace. That I could at least figure out eventually when I realized there wasn't a schema for FundingCode in the JSON, but this u?.match() isn't giving me anything to work with.

To Reproduce

Really no idea. I can't provide my full API spec and don't know how to narrow it down to reproduce. I attempted to reduce my set of paths to find the problem, but that was inconclusive. At the moment the issue is not having enough error information to go on.

Expected behavior

Logs

Prerendering docs
TypeError: u?.match is not a function

OpenAPI description

Redocly version(s)

2.47.0

Node.js version(s)

24.19.0

OS, environment

Alpine linux

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions