MLE-32022 Avoid null pointer exception when FailedRequest is null - #1972
Open
rjdew-progress wants to merge 1 commit into
Open
MLE-32022 Avoid null pointer exception when FailedRequest is null#1972rjdew-progress wants to merge 1 commit into
rjdew-progress wants to merge 1 commit into
Conversation
rjdew-progress
requested review from
RitaChen609,
jonmille,
ngodugu-marklogic and
rjrudin
as code owners
August 21, 2026 16:44
There was a problem hiding this comment.
Pull request overview
Fixes a null-pointer exception when FailedRequest is absent by using an unknown server-status value.
Changes:
- Adds
STATUS_UNKNOWN(-1). - Handles missing failed-request status codes safely.
- Adds regression coverage for null
FailedRequesthandling.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
marklogic-client-api/src/test/java/com/marklogic/client/test/FailedRequestTest.java |
Adds null-request regression test. |
marklogic-client-api/src/main/java/com/marklogic/client/MarkLogicServerException.java |
Prevents null status-code unboxing. |
marklogic-client-api/src/main/java/com/marklogic/client/impl/RESTServices.java |
Defines the unknown status constant. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
rjdew-progress
force-pushed
the
MLE-32022
branch
from
August 21, 2026 16:48
c806b37 to
b539def
Compare
rjrudin
approved these changes
Aug 21, 2026
rjrudin
left a comment
Contributor
There was a problem hiding this comment.
An interesting design choice as to what to return! I could see an argument for returning 500 - i.e. "Well we know the server complained about something, but we have no idea why for internal reasons, so here you go, have a 500" - but -1 seems reasonable as well as a way of communicating that we don't know what happened.
ngodugu-marklogic
approved these changes
Aug 21, 2026
RitaChen609
approved these changes
Aug 21, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses GitHub issue #1969