Skip to content

BUG : Incorrect date formatting and masked error message #202

Description

@DivyanshuVortex

The Problem

  1. Wrong Date Logic: The formatDate function uses 0-indexed months. This causes the library to query the wrong date when verifying service usage (e.g., searching for April instead of May).
  2. Confusing Error Crashes: When an API call fails, the library crashes with a generic SyntaxError: Unexpected end of JSON input. This masks the actual error message from the server, making it hard to debug.
  3. Typos: Several error messages .

The Impact

  • Users get incorrect "0" counts when checking service usage for a specific date.
  • Developers cannot easily tell why an artifact import failed because the real error is hidden.

Proposed Solution

  • Update formatDate to use 1-indexed months and proper padding.
  • Update error handlers to capture and report the raw error text from the server.
  • Add tests that specifically use Date objects to prevent this bug from returning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/runtimeRuntime behavior of test containerkind/bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions