Closed domenic closed 4 years ago
Hm, currently I either send a 200 response if everything's fine, or a 404 response if you didn't call it correctly. I can send a different error code on highlight failure, perhaps 400?
At this point I'd like to defer to @sideshowbarker, as our point person for highlighter integration :). That does sound pretty nice to me though.
So what we need here is to make wattsi fail with a non-zero exit status if the highlighter response is a 4xx (or really, anything other than a 200)?
I can send a different error code on highlight failure, perhaps 400?
400 sounds appropriate to me
@sideshowbarker highlighter should be emitting 400 when the highlighting code errors, let me know if there are any problems
OK, https://github.com/whatwg/wattsi/pull/103 has a patch to make wattsi fail if the highlighter responds with 400 status.
highlighter should be emitting 400 when the highlighting code errors, let me know if there are any problems
The highlighter doesn’t seem to be emitting a 400 when the Web IDL parser finds a syntax error; see https://github.com/tabatkins/highlighter/issues/14
The highlighter chokes on it (as seen in https://github.com/whatwg/html/issues/4832), but the build does not fail when this happens. We should figure out how to make this fail, instead, so that such issues don't recur. (Just edit your local copy of HTML to have an IDL error while testing.)