-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (sync-service): validate shape ID matches shape definition from …
…URL (#1678) This PR fixes #1663. The implemented semantics are the following. - When shape id exists: - and is the currently active shape for this shape definition: - serve it normally - and is not the currently active shape for that shape definition: - return 400 (because there must be a mismatch between shape ID and shape def, otherwise this would be the active shape for that shape definition) - When shape id does not (or no longer) exist: - if there is an active shape for this shape definition: - return 409 that redirects to the active shape - if there is no active shape for this shape definition: - create the shape - return a 409 with a redirect to the newly created shape
- Loading branch information
Showing
7 changed files
with
229 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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,6 @@ | ||
--- | ||
"@electric-sql/client": patch | ||
"@core/sync-service": patch | ||
--- | ||
|
||
Return 400 if shape ID does not match shape definition. Also handle 400 status codes on the client. |
This file contains 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 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 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 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 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 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