File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
xtraplatform-features-sql/src/main/java/de/ii/xtraplatform/features/sql/domain Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -931,9 +931,6 @@ public boolean supportsMutationsInternal() {
931931 return false ;
932932 }
933933 if (!getData ().getDatasetChanges ().isModeCrud ()) {
934- LOGGER .warn (
935- "Feature provider with id '{}' does not support mutations: datasetChanges.mode is not 'CRUD'" ,
936- getId ());
937934 return false ;
938935 }
939936
@@ -1340,10 +1337,17 @@ private MutationResult writeFeatures(
13401337 .withResult ((Builder ) builder )
13411338 .handleError (
13421339 (result , throwable ) -> {
1343- Throwable error =
1344- throwable instanceof PSQLException || throwable instanceof JsonParseException
1345- ? new IllegalArgumentException (throwable .getMessage ())
1346- : throwable ;
1340+ Throwable error = throwable ;
1341+
1342+ if (throwable instanceof PSQLException
1343+ || throwable instanceof JsonParseException ) {
1344+ error =
1345+ new IllegalArgumentException (
1346+ "Invalid feature data. You may be able to obtain more information about the problem by adding the header ‘Prefer: handling=strict’ to the request." ,
1347+ throwable );
1348+ LogContext .errorAsDebug (LOGGER , throwable , "Error during feature mutation" );
1349+ }
1350+
13471351 return result .error (error );
13481352 })
13491353 .handleItem ((Builder ::addIds ))
You can’t perform that action at this time.
0 commit comments