improve exception handling
add support for format query param - overwrites Accept header