-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Assignment/issue 21524 #34677
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
Closed
Closed
Assignment/issue 21524 #34677
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
37493c6
chore: adding the report for issue 34258
RuBrock f6726d3
Merge pull request #1 from RuBrock/chore/issue-34258-report
RuBrock 689ce07
fix(core): categorize UniversalStore internal errors
85c6e66
docs: university assignment report and readme updates
2c47b3b
docs: add PR link to issue 34566 report
a363173
Merge pull request #2 from RuBrock/assignment/issue-34566
RuBrock e59298e
[fix} fixing issue-21524 and fixing typying errors during the yaml check
beoziel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import { StorybookError } from '../../storybook-error'; | ||
|
|
||
| export abstract class UniversalStoreError extends StorybookError { | ||
| constructor(props: { code: number; message: string; name: string }) { | ||
| super({ | ||
| ...props, | ||
| category: 'MANAGER_UNIVERSAL-STORE', | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| export class UniversalStoreFollowerTimeoutError extends UniversalStoreError { | ||
| constructor(public data: { id: string }) { | ||
| super({ | ||
| name: 'UniversalStoreFollowerTimeoutError', | ||
| code: 1, | ||
| message: `No existing state found for follower with id: '${data.id}'. Make sure a leader with the same id exists before creating a follower.`, | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| export class UniversalStoreNotConstructableError extends UniversalStoreError { | ||
| constructor() { | ||
| super({ | ||
| name: 'UniversalStoreNotConstructableError', | ||
| code: 1001, | ||
| message: 'UniversalStore is not constructable - use UniversalStore.create() instead', | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| export class UniversalStoreIdRequiredError extends UniversalStoreError { | ||
| constructor() { | ||
| super({ | ||
| name: 'UniversalStoreIdRequiredError', | ||
| code: 1002, | ||
| message: 'id is required and must be a string, when creating a UniversalStore', | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| export class UniversalStoreNotReadyError extends UniversalStoreError { | ||
| constructor(public data: { id: string; action: 'set state' | 'send event' }) { | ||
| super({ | ||
| name: 'UniversalStoreNotReadyError', | ||
| code: 1003, | ||
| message: `Cannot ${data.action} before store with id '${data.id}' is ready. You can get the current status with store.status, or await store.readyPromise to wait for the store to be ready before sending events.`, | ||
| }); | ||
|
Comment on lines
+42
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The message currently points to a non-existent/publicly incorrect readiness API. Proposed patch export class UniversalStoreNotReadyError extends UniversalStoreError {
constructor(public data: { id: string; action: 'set state' | 'send event' }) {
super({
name: 'UniversalStoreNotReadyError',
code: 1003,
- message: `Cannot ${data.action} before store with id '${data.id}' is ready. You can get the current status with store.status, or await store.readyPromise to wait for the store to be ready before sending events.`,
+ message: `Cannot ${data.action} before store with id '${data.id}' is ready. You can get the current status with store.status, or await store.untilReady() to wait for the store to be ready before sending events.`,
});
}
}🤖 Prompt for AI Agents |
||
| } | ||
| } | ||
|
|
||
| export class UniversalStoreMissingSubscribeArgumentError extends UniversalStoreError { | ||
| constructor(public data: { id: string }) { | ||
| super({ | ||
| name: 'UniversalStoreMissingSubscribeArgumentError', | ||
| code: 1004, | ||
| message: `Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${data.id}'`, | ||
| }); | ||
| } | ||
| } | ||
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove assignment-specific PII from the root README
Line 5–9 publishes personal student identifiers in a project-wide document. This should not live in the public repository README; keep assignment metadata outside the product docs.
Suggested change
🤖 Prompt for AI Agents