Skip to content

Consider separating processMessage() into individual handling methods per DWN Interface Method #289

Closed
@thehenrytsai

Description

@thehenrytsai

Background:

With the introduction and implementation of RecordsRead (and other Interface Methods to follow like RecordsCommit), it is becoming apparent that the return type cannot be represented by a universal type that covers all need, unless we hack our way by adding a bunch of optional properties or even just use any.

Task Details:

  • Maybe the time has come for us to consider evolve processMessage() which has served well, and replace/augment it with individual handlers:

handleRecordsRead(...): RecordsReadResponse { ... }
handleRecordsWrite(...): RecordsWriteResponse { ... }
...

Objective:

  • create a handler for handleRecordsWrite(...): RecordsWriteResponse { ... }

handleRecordsRead(...): RecordsReadResponse { ... } was introduced in this pull request if you're interested in an example.

Picking Up This Issue:

  • If you'd like to work on this, please comment "picking this up" below, and I'll assign the issue to you

Questions:

Resources:

  • Creating a Pull Request: If you're new to GitHub and unsure how to create a pull request, follow this step-by-step guide.

Remember, communication is key! If you have any questions or face any challenges, we're here to help so please don't hesitate to reach out.

Good Luck! 🍁

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershacktoberfestFor the hacking month of OctoberrefactoringCode refactoring with no functional impact

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions