use http header content-type to determine error, instead of returning error. this way we can use regular-old http.handlerfunc for filters