Skip to content

Commit

Permalink
fixup! replace autobahn&crossbar by gRPC
Browse files Browse the repository at this point in the history
Use more descriptive ALREADY_EXISTS rather than generic
FAILED_PRECONDITION status code when ResourceMatch already exists.

Signed-off-by: Bastian Krause <[email protected]>
  • Loading branch information
Bastian-Krause committed Jul 24, 2024
1 parent dac0d84 commit 0fa29eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion labgrid/remote/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ async def AddPlaceMatch(self, request, context):
rm = ResourceMatch(*pattern.split("/"), rename=rename)
if rm in place.matches:
await context.abort(
grpc.StatusCode.FAILED_PRECONDITION, f"Match {rm} already exists"
grpc.StatusCode.ALREADY_EXISTS, f"Match {rm} already exists"
)
place.matches.append(rm)
place.touch()
Expand Down

0 comments on commit 0fa29eb

Please sign in to comment.