commit | dd65cdc000632675a12564d6b1b258e53cbfa92f | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Wed Jan 13 09:16:49 2021 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Fri Jan 15 15:26:40 2021 +0100 |
tree | 551f28dd9549d1d48886ca8e4283bfffadf5fa46 | |
parent | 93e035b6186574104cf04c2caf101028a903c42f [diff] |
Treat uncaught InvalidPathExceptions as '409 Conflict' If there is an invalid path Paths.get(path) throws an InvalidPathException. This is a RuntimeException that currently results in '500 Internal Server Error', not telling the user what is wrong. By handling this exception the user gets a better error message, e.g. telling which path is considered as invalid. E.g. InvalidPathExceptions may be thrown for paths that contain unicode characters. Whether unicode characters in file names trigger this exception depends on the local environment of the system that is running Gerrit (local encoding and locale settings), but we haven't figured out yet which system properties matter here (e.g. unicode characters in file names work fine for me when I run tests from Eclipse, but not when I run the same test via Bazel from the commandline). Since the behaviour depends on the local system we do not have any integration test for the code handling InvalidPathExceptions. Once we figure out which system properties are relevant here, we will set them in the test environment and then we can have tests with unicode characters in filenames. Until then the best we can do is being transparant to users that unicode paths do not work. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I34f0cd30926e02d577480e8efc619ca47b69c821
This plugin provides support for defining code owners for files in a repository.
If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.
Also see resources/Documentation/about.md
IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md