Kinotic-Foundation / structures

Structures is an open-source framework for data storage and retrieval, supporting schema evolution, data management, and providing a user-friendly GUI and OpenAPI interface.
https://kinotic-foundation.github.io/structures/
Other
2 stars 1 forks source link

Make structures Errors more informative. #12

Open NavidMitchell opened 11 months ago

NavidMitchell commented 11 months ago

Currently there are many structures errors that are not very intuitive. I am capturing them here so we can return more intuitive errors to the client.

Current Error: All shards failed. Should Indicate: There was a problem with the search or query string passed to structures.

2023-11-05 20:38:36 co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/search] failed: [search_phase_execution_exception] all shards failed

Current Error: Id field cannot be null or blank. Should indicate: That data passed to a save or update operation has a null id field. Additional information to help determine what data is missing the id, so this can be more easily handled during bulk operations.

2023-11-05 20:53:40 java.lang.IllegalArgumentException: Id field cannot be null or blank
2023-11-05 20:53:40     at org.kinotic.structures.internal.api.decorators.instances.IdDecoratorInstance.process(IdDecoratorInstance.java:28) ~[structures-core-1.8.8-SNAPSHOT.jar:na]
2023-11-05 20:53:40     at org.kinotic.structures.internal.api.decorators.instances.IdDecoratorInstance.process(IdDecoratorInstance.java:12) ~[structures-core-1.8.8-SNAPSHOT.jar:na]
2023-11-05 20:53:40     at org.kinotic.structures.internal.api.decorators.RawJsonUpsertPreProcessor.doProcess(RawJsonUpsertPreProcessor.java:93) ~[structures-core-1.8.8-SNAPSHOT.jar:na]