Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

steveluscher
Copy link
Contributor

@steveluscher steveluscher commented Mar 4, 2024

Summary

The developer will receive a SOLANA_ERROR__CODECS_EXPECTED_FIXED_LENGTH_GOT_VARIABLE_LENGTH and should be able to determine which thing was of the wrong type based on the line that threw that error. I don't think we need to rethrow/respecify the error here.

Addresses #2118.

Copy link
Contributor

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

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

Nice. I'll also need to add this in some of codecs-core, where the assertion error should also bubble up like so.

https://github.com/solana-labs/solana-web3.js/pull/2189/files#diff-5ce092ba320e681ef239979138cbb980d1002062e78222acd522c98fab1fe2bdR24-R31

Copy link
Contributor

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

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

Agreed. Also, TypeScript should prevent these errors so, unless you're DHH, it's unlikely to affect users.

@steveluscher steveluscher force-pushed the 03-04-Reorganize_codec_errors_into_error_code_range_8078000-8078999_ branch from f528a09 to bb38bb1 Compare March 4, 2024 20:31
@steveluscher steveluscher force-pushed the 03-04-Let_the_new_coded_exceptions_from_codecs-core_bubble_up_as-is_through_solana/options_ branch from de2848a to f7dd0d1 Compare March 4, 2024 20:31
@steveluscher steveluscher changed the title Let the new coded exceptions from codecs-core bubble up as-is through @solana/options Let the new coded exceptions from codecs-core bubble up as-is through @solana/options et al Mar 4, 2024
@steveluscher
Copy link
Contributor Author

I'll also need to add this in some of codecs-core, where the assertion error should also bubble up like so.

Done, in this PR!

@steveluscher steveluscher force-pushed the 03-04-Reorganize_codec_errors_into_error_code_range_8078000-8078999_ branch from bb38bb1 to e4634c5 Compare March 4, 2024 20:34
@steveluscher steveluscher force-pushed the 03-04-Let_the_new_coded_exceptions_from_codecs-core_bubble_up_as-is_through_solana/options_ branch from f7dd0d1 to ea29eaa Compare March 4, 2024 20:34
@steveluscher
Copy link
Contributor Author

steveluscher commented Mar 4, 2024

Merge activity

  • Mar 4, 12:41 PM PST: @steveluscher started a stack merge that includes this pull request via Graphite.
  • Mar 4, 12:42 PM PST: Graphite rebased this pull request as part of a merge.
  • Mar 4, 12:43 PM PST: @steveluscher merged this pull request with Graphite.

Base automatically changed from 03-04-Reorganize_codec_errors_into_error_code_range_8078000-8078999_ to master March 4, 2024 20:41
@steveluscher steveluscher force-pushed the 03-04-Let_the_new_coded_exceptions_from_codecs-core_bubble_up_as-is_through_solana/options_ branch from ea29eaa to 9a1834c Compare March 4, 2024 20:42
@steveluscher steveluscher merged commit 27479b3 into master Mar 4, 2024
6 checks passed
@steveluscher steveluscher deleted the 03-04-Let_the_new_coded_exceptions_from_codecs-core_bubble_up_as-is_through_solana/options_ branch March 4, 2024 20:43
Copy link
Contributor

github-actions bot commented Mar 7, 2024

🎉 This PR is included in version 1.91.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants