ENGINE-1669 : ClassCastException with engine's HTTP API
- Prevent ClassCastException on options when the options are empty
ENGINE-1500 : Add log when throw UndeclaredThrowableException