utils icon indicating copy to clipboard operation
utils copied to clipboard

Forbid `undefined` values on request and response objects

Open rekmarks opened this issue 3 years ago • 1 comments

Here's the problem:

> JSON.stringify({ foo: undefined })
'{}'

Any request or response objects that are serialized before being transported will lose any fields with the value undefined. Introspecting params or errors to suss out such fields is beyond the scope of this package, but there's an argument that we should throw errors if we detect that any top-level top-level request or response property exists and has the value undefined.

That may also be out of scope for this package, but this is as good a place to track it as any.

rekmarks avatar May 18 '21 02:05 rekmarks