Skip to content

Commit

Permalink
Updated ProtocolAuthorizationParentlessIncorrectProtocolPath error me…
Browse files Browse the repository at this point in the history
…ssage to include reference to just `parent` (#724)
  • Loading branch information
kirahsapong authored Apr 24, 2024
1 parent 57fa853 commit a0f2b97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/protocol-authorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export class ProtocolAuthorization {
if (declaredProtocolPath !== declaredTypeName) {
throw new DwnError(
DwnErrorCode.ProtocolAuthorizationParentlessIncorrectProtocolPath,
`Declared protocol path '${declaredProtocolPath}' is not valid for records with no parentId'.`
`Declared protocol path '${declaredProtocolPath}' is not valid for records with no parent'.`
);
}

Expand Down
1 change: 1 addition & 0 deletions tests/handlers/records-write.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2479,6 +2479,7 @@ export function testRecordsWriteHandler(): void {
const reply = await dwn.processMessage(alice.did, credentialApplication.message, { dataStream: credentialApplication.dataStream });
expect(reply.status.code).to.equal(400);
expect(reply.status.detail).to.contain(DwnErrorCode.ProtocolAuthorizationParentlessIncorrectProtocolPath);
expect(reply.status.detail).to.contain('is not valid for records with no parent');
});

it('#690 - should only allow data format of a protocol-space record to be updated to any value allowed by the protocol configuration', async () => {
Expand Down

0 comments on commit a0f2b97

Please sign in to comment.