mirror of
https://github.com/apple/pkl.git
synced 2026-03-20 08:14:15 +01:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user