Skip to content

apiClient uses baseURL from env — if unset, silently defaults to localhost:3001 with no feedback #357

Description

@therealjhay

File: lib/api/axios.ts, line 16

When NEXT_PUBLIC_API_URL is not set, the axios client defaults to http://localhost:3001. In production, this will cause all API calls to fail. Add a build-time warning (via next.config.js environment validation) and a runtime console.warning in development. Additionally, the mock mode detection should be more explicit: if the API is unreachable, log a clearly formatted message.


Labels: enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions