Transforms a single GraphQL error. Optionally accepts a request payload which can be used in certain cases to add supplemental info to the error.