Skip to content

npubs commands fail with cryptic "Only POST is supported." when no auth proxy is configured #41

Description

@bilthon

Description

On a plain local install (no daemonUrl and no authUrl configured), running any npubs command crashes with an unhandled error that has nothing to do with what the user typed.

Steps to reproduce

routstrd onboard      # standard local setup, no remote/auth proxy
routstrd npubs list

Output:

76 |     body: bodyString,
77 |   });
78 | 
79 |   if (!response.ok) {
80 |     const errorData = (await response.json()) as { error?: string };
81 |     throw new Error(errorData.error || `HTTP ${response.status}`);
               ^
error: Only POST is supported.
      at /Users/bilthon/Development/Routstr/routstrd/src/utils/daemon-client.ts:81:11

Bun v1.1.42 (macOS arm64)

Expected result

A clear message explaining that npubs requires a routstrd-auth server, e.g.

Environment

  • routstrd dev build (local bun link)
  • Bun v1.1.42, macOS arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions