improve exception handling
fixed: authorization header handling