onbjerg/micro-visualize

Not logging request json?

Closed this issue · 5 comments

6fb7dda#diff-168726dbe96b3ce427e7fedce31bb0bcR19

Did you mean req.headers['content-type']?

Oh crap, you're right. Sorry for the inconvenience and thank you for spotting it.

I've fixed it in v3.0.1.

Mmmmm something funky is going on. It hangs up on https://github.com/onbjerg/micro-visualize/blob/master/index.js#L21 , and then throws "Invalid body" https://github.com/zeit/micro/blob/master/lib/server.js#L74 on some requests

I think it's when another middleware returns out without calling next function.

Couldn't figure it out quickly, gonna move back to 3.0.0

Hmm, I'll check it out later. Thanks 😄

Actually, maybe I should write some simple tests for this.

@onbjerg Got it, was my bad :) Developing lib, which also calls await json(req), but had micro as a dependency instead of as a peer dependency, so it was trying to pull the text from the req stream twice.

@tuckerconnelly Glad to hear it! Good luck with your library 😄