Skip to content

docs: fix pnpm URL and schema link in contributing.md#264

Merged
JuroUhlar merged 1 commit into
mainfrom
docs/fix-contributing-links
Jul 13, 2026
Merged

docs: fix pnpm URL and schema link in contributing.md#264
JuroUhlar merged 1 commit into
mainfrom
docs/fix-contributing-links

Conversation

@JuroUhlar

Copy link
Copy Markdown
Collaborator
  • Fix pnpm links (pnpmpkg.compnpm.io) in contributing.md.
  • Fix the type-regeneration schema link text, which pointed at a nonexistent res/schema.json; now matches the real resources/fingerprint-server-api.yaml.
  • Clarify the Node 22.13.0+ prerequisite is for local dev + CI, and that the consumer requirement lives in package.json engines.node.

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c646542

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@JuroUhlar

Copy link
Copy Markdown
Collaborator Author

@copilot review

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Following releases will be created using changesets from this PR:

@fingerprint/node-sdk@7.5.0

Minor Changes

  • Separate Server API errors from other request errors and strongly type the error code.

    • Added ServerApiError (extends RequestError), thrown when the Server API returns a structured error response. It narrows errorCode to the strongly typed ErrorCode and exposes responseBody: ErrorResponse.
    • Exported the ErrorCode type (the union of error codes returned by the Fingerprint Server API).
    • TooManyRequestsError now extends ServerApiError.
    • RequestError remains the base class for request-level errors and is thrown directly for non–Server-API responses (for example, errors returned by an intermediate proxy). Its errorCode stays a free-form string (a best-effort placeholder derived from statusText), exactly as before.

    This is a backward-compatible change: structured Server API errors are now instances of ServerApiError (a subclass of RequestError). error instanceof RequestError checks keep working, and errorCode stays populated on every error. To get the strictly typed errorCode, narrow to ServerApiError (if (error instanceof ServerApiError) { error.errorCode }). (808c802)

Patch Changes

  • errors: Normalize caught values into real Error instances, so errors from unseal and JSON parsing always carry a genuine Error. (5764c11)
  • Throw a RequestError instead of a top-level SdkError when a Server API error response has a non-JSON body (e.g. an HTML error page from a proxy). (b16cb93)

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 98.15% 159/162
🟢 Branches 96.84% 92/95
🟢 Functions 100% 35/35
🟢 Lines 98.11% 156/159

Test suite run success

83 tests passing in 24 suites.

Report generated by 🧪jest coverage report action from c646542

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟢 All files 98.14 96.84 100 98.11
🟢  src 98.43 98.66 100 98.41
🔴   ...edApiTypes.ts 0 0 0 0
🔴   index.ts 0 0 0 0
🟢   sealedResults.ts 100 100 100 100
🟢   ...rApiClient.ts 96.15 97.22 100 96.15 358,362
🟢   types.ts 100 100 100 100
🟢   urlUtils.ts 100 100 100 100
🟢   webhook.ts 100 100 100 100
🟢  src/errors 97.05 90 100 96.96
🟢   apiErrors.ts 100 100 100 100
🟢   ...orResponse.ts 100 100 100 100
🟢   toError.ts 87.5 88.88 100 87.5 21
🟢   unsealError.ts 100 50 100 100 10

@JuroUhlar JuroUhlar merged commit ec98ada into main Jul 13, 2026
20 checks passed
@JuroUhlar JuroUhlar deleted the docs/fix-contributing-links branch July 13, 2026 12:53
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.

2 participants