Skip to content

feat: add throwable usage#23

Open
2-towns wants to merge 1 commit into
masterfrom
feat/throwing
Open

feat: add throwable usage#23
2-towns wants to merge 1 commit into
masterfrom
feat/throwing

Conversation

@2-towns
Copy link
Copy Markdown
Collaborator

@2-towns 2-towns commented May 30, 2025

This PR allows to use throwable object instead of safe value. Example:

import { Codex } from "@codex-storage/sdk-js/throwable";

const marketplace = codex.marketplace;

try {
  const slots = marketplace.activeSlots();
} catch (e) {
  // Do something
}

@AuHau

@2-towns 2-towns marked this pull request as ready for review June 5, 2025 09:48
Copy link
Copy Markdown
Contributor

@AuHau AuHau left a comment

Choose a reason for hiding this comment

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

Nice! Thanks a lot! 👍

Comment thread README.md
const marketplace = codex.marketplace;

try {
const slots = marketplace.activeSlots();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const slots = marketplace.activeSlots();
const slots = await marketplace.activeSlots();

Shouldn't it be like this?

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