Skip to content

Conversation

@mandarini
Copy link
Contributor

Summary

  • Align StorageAnalyticsClient.from() catalog operations with SDK's { data, error } pattern
  • Bump iceberg-js dependency from 0.8.0 to 0.8.1
  • Update JSDoc examples and tests to reflect the new API

Context

An issue showed 500 errors when analytics catalog operations returned 404s. The platform API catch block couldn't distinguish client errors from server errors because the SDK was throwing instead of returning errors in the response.

Most storage operations return { data, error } and don't throw (unless using throwOnError()). The analytics catalog was inconsistent with this pattern.

Since analytics buckets are in public alpha, we're treating this as a "got it wrong from the beginning" fix rather than a breaking change requiring a major version bump.

Changes

Before:

const catalog = supabase.storage.analytics.from('my-bucket')
const tables = await catalog.listTables({ namespace: ['default'] }) // throws on error

After:

const catalog = supabase.storage.analytics.from('my-bucket')
const { data: tables, error } = await catalog.listTables({ namespace: ['default'] })
if (error?.isNotFound()) {
    console.log('Namespace not found')
}

@mandarini mandarini self-assigned this Dec 5, 2025
@github-actions github-actions bot added the storage-js Related to the storage-js library. label Dec 5, 2025
@mandarini mandarini changed the title fix(storage): align analytics from method with { data, error } pattern feat(storage): align analytics from method with { data, error } pattern Dec 5, 2025
@mandarini mandarini force-pushed the feat/storage-iceberg-return branch from 45d3ab7 to 80934fe Compare December 5, 2025 14:00
@mandarini mandarini marked this pull request as ready for review December 5, 2025 14:01
@mandarini mandarini requested review from a team as code owners December 5, 2025 14:01
@coveralls
Copy link

Coverage Status

coverage: 95.367% (+14.2%) from 81.176%
when pulling 80934fe on feat/storage-iceberg-return
into 21e1008 on master.

@coveralls
Copy link

coveralls commented Dec 5, 2025

Coverage Status

coverage: 80.689% (-0.5%) from 81.176%
when pulling 80934fe on feat/storage-iceberg-return
into 21e1008 on master.

Copy link
Contributor

@grdsdev grdsdev left a comment

Choose a reason for hiding this comment

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

Nice!

@mandarini mandarini merged commit 0baaf06 into master Dec 5, 2025
29 of 30 checks passed
@mandarini mandarini deleted the feat/storage-iceberg-return branch December 5, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

storage-js Related to the storage-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants