Raise BadRequestException if decode fails