Skip to content

fix : Incorrect date formatting and masked error messages#204

Open
DivyanshuVortex wants to merge 1 commit intomicrocks:mainfrom
DivyanshuVortex:fix-microcks-logic-and-typos
Open

fix : Incorrect date formatting and masked error messages#204
DivyanshuVortex wants to merge 1 commit intomicrocks:mainfrom
DivyanshuVortex:fix-microcks-logic-and-typos

Conversation

@DivyanshuVortex
Copy link
Copy Markdown

Summary

This PR fixes a bug in date calculation and improves how the library reports errors.

Why this is important

  • Fixes Broken Logic: Corrects a bug where querying service usage for a specific date returned wrong results because the month was calculated incorrectly.
  • Better Developer Experience: Instead of crashing with a generic "JSON error," the library now shows the actual reason for a failure (e.g., "File not found"), making it much easier to debug.
  • Test Integrity: Added new tests to guarantee that date-based verification works perfectly and won't break in the future.

Changes

  • Fixed formatDate month indexing and padding.
  • Surfaced real error messages from the Microcks API.
  • Fixed typos in error strings.
  • Added regression tests for date verification.

Fixes : #202

Signed-off-by: DivyanshuVorrtex <divyanshuchandra9027@gmail.com>
@DivyanshuVortex DivyanshuVortex requested a review from lbroudoux as a code owner May 7, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG : Incorrect date formatting and masked error message

1 participant