Comments (7)
Thanks @ralfhergert , I'll do some research on this today and get back to you soon.
from java-client-api.
@ralfhergert Sorry for the delay, still have analyzing this on my to-do list!
from java-client-api.
@ralfhergert Turns out we have several tests for this feature already - all of which are doing what you're doing too! We somewhat surprisingly don't have any subclasses of FailedRequestException
yet, but I see no issue with starting that pattern.
There are two similar codes:
- RESTAPI-CONTENTNOVERSION
- RESTAPI-CONTENTWRONGVERSION
Full list of REST API error codes is at https://docs.marklogic.com/11.0/guide/messages/RESTAPI-en .
I am wondering if it would be beneficial to use class names of e.g. ContentNoVersionException
and ContentWrongVersionException
that don't attempt to abstract over the error code. Would those be self-documenting enough to achieve your goal of both 1) not having to do a string check, and 2) making your code easier to understand?
from java-client-api.
Hi @rjrudin, thanks for your response. Yes, the intended exceptions ContentNoVersionException
and ContentWrongVersionException
would work for us. They would achieve that we no longer have to implement the technical detail of "having to know the ML REST error strings". And they would allow us to catch the exceptions without further probing them for the underlying cause. - Looking forward to it. :)
from java-client-api.
Got it - we're doing a 6.2.1 release soon, I'm leaning towards sneaking this in even though it's technically a minor enhancement. The exception message won't change, just the class type, and it'll be a subclass of FailedRequestException
.
from java-client-api.
Being addressed via #1590
from java-client-api.
Will be in 6.3.0, which will be released shortly.
from java-client-api.
Related Issues (20)
- DMSDK has troubles with tiered storage offline HOT 8
- Transfer Encoding has non-emtpy body when no result in returned through okhttp HOT 3
- op.sampleBy misses the 0 parameter overloaded method HOT 1
- Delete temporal documents via DMSDK HOT 2
- Specifi page length and startIndex for dataMOvementManager using newQueryBatcher HOT 3
- Upgrade to jackson-databind 2.14.0 when available HOT 2
- WriteBatcher does not write documents when total documents provided is less than 100 and without using withBatchSize HOT 1
- SparQL query throws unexpected error HOT 3
- Executing PatchHandle against non-existing Document does not throw an Exception HOT 5
- Incorrectly return empty query result HOT 3
- Support for Java 17? HOT 8
- Numbers returned by MarkLogic do not use scientific notation HOT 1
- Implementations of innerSerialize lack proper namespace HOT 11
- Request for Jakarta EE 10 compliant version HOT 18
- Remove "ML-Check-ML11-Headers" for ML11 java client api HOT 1
- Directory queries allow for invalid values of "depth" without throwing an error HOT 3
- Wrong timeout conversion in awaitCompletion HOT 4
- search:and-not-query is ignored in QueryBatcher HOT 6
- queryManager.uris does not honor additional-query in search options HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-client-api.