Failed requests should return descriptive error messages
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Currently, if a request fails to complete due to a timeout or resource exhaustion, we just show a 500 error which doesn't give the user any context on what went wrong. It would be great if we can provide more detail to the user so that they can quickly take appropriate action instead of wasting time trying to figure out a generic error message.
Intended users
- Customers
- Developers
- Support engineers
Further details
Consider these logs:
2019-03-22_14:44:16.12097 time="2019-03-22T14:44:16Z" level=info msg="finished streaming call with code Canceled" error="rpc error: code = Canceled desc = rpc error: code = Unavailable desc = CommitDiff: send: rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.meta.auth_version=v2 grpc.meta.client_name=gitlab-web grpc.method=CommitDiff grpc.request.deadline="2019-03-22T14:44:16Z" grpc.request.fullMethod=/gitaly.DiffService/CommitDiff grpc.request.glRepository=project-1 grpc.request.repoPath=group/project.git grpc.request.repoStorage=default grpc.request.topLevelGroup=smart-assurance grpc.service=gitaly.DiffService grpc.start_time="2019-03-22T14:43:16Z" grpc.time_ms=60025.1 peer.address=@ span.kind=server system=grpc
This log is from a failed request for creating a merge request for a huge changeset.
Instead of simply throwing a 500 error, we could perhaps also say why the request timed out.
Proposal
Add more details to error messages.
Links / references
- https://gitlab.zendesk.com/agent/tickets/117200
-
https://gitlab.zendesk.com/agent/tickets/447124 (similar error, but related to
DiffStats
as well asCommitDiff
; internal logs in Sentry & ES)
Edited by 🤖 GitLab Bot 🤖