add spec to error serializer