overriding onBadRequest to add debug logging