Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
andresuribe87 committed Aug 7, 2024
1 parent 505a045 commit 4cdc932
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/handlers/records-write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ export class RecordsWriteHandler implements MethodHandler {
}

const messageReply = {
// In order to discern between something that was accepted as a queryable write and something that was accepted
// as an initial state we use separate response codes. See https://github.com/TBD54566975/dwn-sdk-js/issues/695
// for more details.
status: (newMessageIsInitialWrite && dataStream === undefined) ?
{ code: 204, detail: 'No Content' } :
{ code: 202, detail: 'Accepted' }
Expand Down

0 comments on commit 4cdc932

Please sign in to comment.