Testing Unauthorized Error Handling with Effect/Vitest: Unexpected Serialized Error Output

I'm trying to test a specific error scenario with effect/vitest.

I can see that I am hitting the error but my expect isn't what i'm expecting.

The error I am hitting is an HttpError.unauthorizedError('invalid protect node, did not pass validation')

So I would expect that to be my "result"?

but I see my "serializedError" as this jargon:

{ span: undefined, status: 401, content: { body: { '0': 105, '1': 110, '2': 118, '3': 97, '4': 108, '5': 105, ......


if i test in postman, i do get this "string" back from the server as i'd expect
Was this page helpful?