Skip to content

Commit

Permalink
reorder not implemented error messages for dev convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
MJ1998 committed Oct 17, 2024
1 parent 11d53ad commit 5b5aab4
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ private constructor(
squash: Boolean,
bundleSize: Int,
): UploadStrategy {
if (!squash) {
throw NotImplementedError("No squashing with bundle uploading not supported yet.")
}
if (methodForUpdate == HttpUpdateMethod.PUT) {
throw NotImplementedError("PUT for UPDATE not supported yet.")
}
if (!squash) {
throw NotImplementedError("No squashing with bundle uploading not supported yet.")
}
return UploadStrategy(
localChangesFetchMode = LocalChangesFetchMode.AllChanges,
patchGeneratorMode = PatchGeneratorMode.PerResource,
Expand Down Expand Up @@ -122,12 +122,12 @@ private constructor(
methodForUpdate: HttpUpdateMethod,
squash: Boolean,
): UploadStrategy {
require(methodForUpdate != HttpUpdateMethod.PUT || squash) {
"Http method PUT not supported for UPDATE with squash set as false."
}
if (methodForUpdate == HttpUpdateMethod.PUT) {
throw NotImplementedError("PUT for UPDATE not supported yet.")
}
require(methodForUpdate != HttpUpdateMethod.PUT || squash) {
"Http method PUT not supported for UPDATE with squash set as false."
}
return UploadStrategy(
localChangesFetchMode =
if (squash) LocalChangesFetchMode.PerResource else LocalChangesFetchMode.EarliestChange,
Expand Down

0 comments on commit 5b5aab4

Please sign in to comment.