Skip to content

Verify criipto metadata#36

Merged
janmeier merged 2 commits into
masterfrom
verify-criipto-metadata
Mar 24, 2026
Merged

Verify criipto metadata#36
janmeier merged 2 commits into
masterfrom
verify-criipto-metadata

Conversation

@janmeier

Copy link
Copy Markdown
Collaborator

Add validation for misconfigured domain or client ID.

When calling fetchMetadata, we now try to catch and warn the user about the most common failure modes. This will not catch all domain errors, because the fetch might fail due to CORS, which we cannot easily distinquish from other network related errors. But it's a lot better than nothing

This allows consumers to easily check if the error comes from our SDK, using `err instanceof IduraSDKError`.

This commit also changes all existing error to extend the base class.
…figured domain or client ID.

When calling fetchMetadata, we now try to catch and warn the user about the most common failure modes. This will not catch all domain errors, because the fetch might fail due to CORS, which we cannot easily distinquish from other network related errors. But it's a lot better than nothing
@janmeier janmeier requested review from jlndk and mickhansen March 24, 2026 10:51
@netlify

netlify Bot commented Mar 24, 2026

Copy link
Copy Markdown

Deploy Preview for rainbow-trifle-ec1333 ready!

Name Link
🔨 Latest commit 0c1da4a
🔍 Latest deploy log https://app.netlify.com/projects/rainbow-trifle-ec1333/deploys/69c26ca6fe51e400082d9969
😎 Deploy Preview https://deploy-preview-36--rainbow-trifle-ec1333.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread src/QrCode.ts
export class PromiseCancelledError extends IduraSDKError {
constructor() {
super("Promise cancelled");
Object.setPrototypeOf(this, PromiseCancelledError.prototype);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only required for es5

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janmeier I thought it was generally required per the TS docs?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.typescriptlang.org/docs/handbook/2/classes.html#inheriting-built-in-types

Note: If you don’t plan to inherit from built-in types like Array, Error, Map, etc. or your compilation target is explicitly set to ES6/ES2015 or above, you may skip this section

@janmeier janmeier merged commit 0d20c46 into master Mar 24, 2026
5 checks passed
@janmeier janmeier deleted the verify-criipto-metadata branch March 24, 2026 11:41
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