WASI icon indicating copy to clipboard operation
WASI copied to clipboard

OutgoingBody finish content length errors

Open guybedford opened this issue 2 years ago • 4 comments

When the written body is less than the content length, the only error code that fits is internal-error.

But when the written body is more than the content length, perhaps it would make sense to use the existing HTTP-request-body-size(option<u64>) error code which is meant to be for when the body is too long? Alternatively should this also be internal-error?

Then, for both of these, it would be nice to have a proper error code instead of making it an internal error. Perhaps a dedicated HTTP-request-body-content-length-invalid(option<u64>)?

guybedford avatar Nov 23 '23 23:11 guybedford