fix!(errors): regroup error codes into unified chunks and fix out-of-range codes#1127
Open
msluszniak wants to merge 4 commits intosoftware-mansion:mainfrom
Open
fix!(errors): regroup error codes into unified chunks and fix out-of-range codes#1127msluszniak wants to merge 4 commits intosoftware-mansion:mainfrom
msluszniak wants to merge 4 commits intosoftware-mansion:mainfrom
Conversation
Consolidate npm update configuration and change schedule to monthly.
…ange codes - InvalidModelSource: 0xff → 0x78 (was outside the 0x60-0x7f general range) - UnexpectedNumInputs: 0x61 → 0x79 (was below the main general block start) - TokenizerError: moved from before the SpeechToText section into it (code 0xa7 is correct, position was wrong) - Added range headers (0x60-0x7f, 0xa0-0xaf, 0xb0-0xbf, 0x00-0x3f) to each section - Regenerated ErrorCodes.ts and ErrorCodes.h via codegen:errors Closes software-mansion#820 https://claude.ai/code/session_01DL16DfNCQUGDvmKedjsWCZ
This comment was marked as resolved.
This comment was marked as resolved.
TokenizerError is not exclusive to Speech-to-Text — tokenizers are used across LLMs, embeddings, and other models. Reassign from 0xa7 to 0x7a and move it into the general RNE errors section (0x60-0x7f). https://claude.ai/code/session_01DL16DfNCQUGDvmKedjsWCZ
This comment was marked as off-topic.
This comment was marked as off-topic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes error code grouping issues in
scripts/errors.config.ts. Three codes were out of their designated ranges, and section headers lacked range annotations. Both generated artefacts (ErrorCodes.ts,ErrorCodes.h) were updated accordingly.InvalidModelSource0xff(255)0x78(120)0x60–0x7fUnexpectedNumInputs0x61(97)0x79(121)0x65), creating a gapTokenizerError0xa7(167)0x7a(122)Section headers now document their allocated hex ranges:
0x60–0x7f·0xa0–0xaf·0xb0–0xbf·0x00–0x3f(with0x00–0x0f,0x10–0x1f,0x20–0x2f,0x30–0x3fsub-sections).Introduces a breaking change?
InvalidModelSource,UnexpectedNumInputs, andTokenizerErrorhave new numeric values. Any code comparingerror.codeagainst the old raw integers (255/97/167) must switch to the named enum constants.Type of change
Tested on
Testing instructions
yarn codegen:errors— output should be identical to the committed generated files.RnExecutorchErrorCode.InvalidModelSource === 120,RnExecutorchErrorCode.UnexpectedNumInputs === 121,RnExecutorchErrorCode.TokenizerError === 122at runtime.cd packages/react-native-executorch && tsc --noEmit.255,97, or167— there should be none.Screenshots
N/A
Related issues
Fixes #820
Checklist
Additional notes
The
errors.config.tsfile is the single source of truth — the two generated files (ErrorCodes.tsandErrorCodes.h) are committed artefacts produced byyarn codegen:errorsand should not be edited manually.