-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return a clear error message when rate limit is hit #138
return a clear error message when rate limit is hit #138
Conversation
closes #133 Signed-off-by: Jorge Aguilera <[email protected]>
src/main/groovy/io/seqera/wave/controller/JsonDockerError.groovy
Outdated
Show resolved
Hide resolved
think if it could not make more sense of changing the interface to return a boolean instead of an exception
and then throw the docker exception |
also, we can catch the specific SlowDownException in the ErrorController and return a RegistryErrorResponse |
Signed-off-by: Jorge Aguilera <[email protected]>
Yes, but I feel like an ad hoc fix. In principle, that exception could the raised somewhere else. This is why I think the rate limiter should just tell yes/how and the inoking method use the most appropriate exception |
Ok, I just updated the PR with the ErrorController approach but will change it to this approach |
src/main/groovy/io/seqera/wave/controller/ErrorController.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: Jorge Aguilera <[email protected]>
src/main/groovy/io/seqera/wave/controller/RegistryProxyController.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: Jorge Aguilera <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
ok, just removed the docker specific handler from the global error controller. |
Signed-off-by: Jorge Aguilera <[email protected]> Signed-off-by: Paolo Di Tommaso <[email protected]> Co-authored-by: Paolo Di Tommaso <[email protected]>
Plus test I've tested using a docker command line, and the error appears as:
closes #133
Signed-off-by: Jorge Aguilera [email protected]