-
Notifications
You must be signed in to change notification settings - Fork 134
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
Improve error management when scanning chunks #395
Comments
The problem is the field is called "filename" but what we put in it is not a filename. When we scan paths or commits, it is the absolute path of the document, which can be longer than 256 characters. When we scan docker images, it's the concatenation of the layer UUID and the absolute path of the document inside the layer. We need more than a filename to point the user to the secret location. In my opinion what we should do is remove the 256 characters limitation on the server side.
It happens when an exception is raised before calling the API. In this case, the |
Revisiting this issue: ggshield used to rely on the filename to match a scan with its result, but it's no longer the case since #435, so we should be able to only set a filename in this field, as initially intended. |
Is your feature request related to a problem? Please describe.
Following issue #391 : I realized that the error message was not perfectly accurate.
GGshield displays a
network error occurred
. This is kind of true as this happens while interacting with the API, but on the other hand, the user might think of a lower level network error.Describe the solution you'd like
When sending a filename that is too long to the API, we get a
status_code
400 with a codemax_length
. We could adapt the output of ggshield for this case, and perhaps for other ones ?Additional context
Also, I am a bit puzzled by why the status_code is None at that point.
The text was updated successfully, but these errors were encountered: