Skip to content

Good First Issue: Map standard HTTP response codes to descriptive errors in HttpTransport #79

Description

@dev-dami

Summary

Enhance error handling in HttpTransport to map common HTTP error statuses (like 401 Unauthorized or 429 Too Many Requests) to specific, descriptive messages rather than generic HTTP errors.

Why

If the remote logging endpoint rejects the logs with 401 or throttling (429), developers benefit from seeing the exact cause in their application's warning/error streams rather than a vague error description.

Scope

  • Update response code handling in src/transports/HttpTransport.ts.
  • Map 429 response to a descriptive warning indicating rate-limiting.
  • Map 401/403 to authentication setup validation warning.
  • Add corresponding unit tests in tests/transports/HttpTransport.test.ts.

Acceptance Criteria

  • Clear, specific error messages are printed/passed to onError handler for 401, 403, and 429 status codes.
  • All new tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions