feat: better logging of type mismatch error