panic instead of returning errors

This matches the behaviour of the http package