Skip to content

docs(sdk): an absent id reads back as null, not as a failure - #190

Merged
delchev merged 1 commit into
masterfrom
docs/find-by-id-null
Aug 15, 2026
Merged

docs(sdk): an absent id reads back as null, not as a failure#190
delchev merged 1 commit into
masterfrom
docs/find-by-id-null

Conversation

@delchev

@delchev delchev commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Follows eclipse-dirigible/dirigible#6752 (issue #6420), which makes JavaRepository.findById honour its documented contract.

The SDK pages listed findById / findOne among the repository methods but never said what an id that is not there does. That silence is what the issue was about: absence is an ordinary outcome, and the caller — not the repository — decides what it means.

  • component/decorators.md — states the contract (null / empty Optional, neither throws) and shows the controller shape, including the trap that a controller method returning null answers 204 No Content, which would overwrite a 404 just set.
  • get-started.md — adds findOne(id) to the method list and one sentence on the contract, linking to the details.

npm run docs:build passes.

🤖 Generated with Claude Code

JavaRepository.findById answers null for an id that is not there, and
findOne answers an empty Optional - neither throws, so the caller decides
what absence means. Documents the controller shape that follows from it,
including the trap that returning null from a controller method answers
204 and would overwrite a 404 just set.

Platform side: eclipse-dirigible/dirigible#6752 (issue #6420).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@delchev
delchev merged commit a6766f9 into master Aug 15, 2026
@delchev
delchev deleted the docs/find-by-id-null branch August 15, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant