Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RED-17] Port build-time error message extraction from redux core #3374

Closed
markerikson opened this issue Apr 18, 2023 · 1 comment
Closed
Labels
linear Created by Linear-GitHub Sync
Milestone

Comments

@markerikson
Copy link
Collaborator

markerikson commented Apr 18, 2023

Refs:

RED-17

@markerikson markerikson added this to the 2.0 milestone Apr 18, 2023
@markerikson
Copy link
Collaborator Author

I just went through a prod build, and here's all the error message strings:

"prepareAction did not return an object"
'"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'
"when using a middleware builder function, an array of middleware must be returned"
"when using a middleware builder function, an array of middleware must be returned"
"each middleware provided to configureStore must be a function"
'"enhancers" field must be a callback'
'"enhancers" callback must return an array'
"each enhancer provided to configureStore must be a function"
"addCase cannot be called with two reducers for the same action type"
"`name` is a required option for createSlice"
"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation."
"Creating or removing a listener requires one of the known fields for matching an action"
"Unsubscribe not initialized"
`${G}: getOriginalState can only be called synchronously`
`The slice reducer for key "${a.toString()}" returned undefined when called for selector(). If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`

that's 15 messages, 1274 characters.

plus, 15 x 17 chars for throw new Error(), so right about 1500 characters

so we could probably shave off about 1300-1400 bytes if we did the error extraction

@markerikson markerikson added the linear Created by Linear-GitHub Sync label Sep 22, 2023
@markerikson markerikson changed the title Port build-time error message extraction from redux core [RED-17] Port build-time error message extraction from redux core Sep 22, 2023
@markerikson markerikson mentioned this issue Oct 1, 2023
26 tasks
@markerikson markerikson closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

1 participant