Handle null contents gracefully in message passing API (#657)

In messages "Read Resource Response" and "Read Module Response", if `contents` and `error` are both null, default to an empty byte array/string.

This resolves one of the issues reported in #656
This commit is contained in:
Josh B authored and GitHub committed 2024-10-01 12:54:06 -07:00
1 parent cc1e432a30
commit b072794d0d
4 files changed
+86 -2

No files matched your search

@@ -414,6 +414,8 @@ The response to <<read-resource-request>>.
If successful, `contents` is set.
Otherwise, `error` is set.
If neither is set, `contents` defaults to an empty byte array.
[source,pkl]
----
/// A number identifying this request.
@@ -463,6 +465,8 @@ The response to <<read-module-request>>.
If successful, `contents` is set.
Otherwise, `error` is set.
If neither is set, `contents` defaults to an empty string.
[source,pkl]
----
/// A number identifying this request.