Skip to content

Conversation

@tcheeric
Copy link
Owner

@tcheeric tcheeric commented Oct 6, 2025

Summary

Related issue: #____ (code review Finding 1.3)

What changed?

  • Introduced a shared unchecked exception hierarchy (NostrRuntimeException and specializations) to align with the error-handling policy from Finding 1.3.
  • Updated existing encoding and crypto exception types to extend the new hierarchy so callers observe consistent runtime behaviour.
  • Retained NostrException for compatibility while delegating to the protocol-specific base class.

BREAKING

None.

Review focus

  • Confirm the new base exceptions cover the previously mixed checked/unchecked cases without missing usage sites.

Checklist

  • Scope ≤ 300 lines (or split/stack)
  • Title is verb + object (e.g., “Refactor auth middleware to async”)
  • Description links the issue and answers “why now?”
  • BREAKING flagged if needed
  • Tests/docs updated (if relevant)

Testing

  • mvn -q verify (fails: xyz.tcheeric:nostr-java-bom:1.1.1 missing from Maven Central)

Network Access


https://chatgpt.com/codex/tasks/task_b_68e337e2acfc83319e62250f0db94bc8

@codecov-commenter
Copy link

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@tcheeric tcheeric merged commit 7816173 into develop Oct 6, 2025
2 checks passed
@tcheeric tcheeric deleted the codex/create-tasks-for-milestone-1 branch October 6, 2025 04:19
@chatgpt-codex-connector
Copy link

💡 Codex Review

relaysTag.getRelays().forEach(json -> writeString(jsonGenerator, json.getUri()));
jsonGenerator.writeEndArray();
}
private static void writeString(JsonGenerator jsonGenerator, String json) throws IOException {

P0 Badge Handle IOException in RelaysTagSerializer forEach

Removing @SneakyThrows caused writeString to declare throws IOException, but the method is still invoked from the relaysTag.getRelays().forEach(...) lambda. Because List.forEach expects a Consumer whose accept method does not allow checked exceptions, this code no longer compiles—IOException cannot be thrown or propagated from the lambda. Wrap the call in a try/catch or avoid declaring a checked exception here so the module builds again.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants