Files
teleport/lib/utils/parse
Marco André DinisandVitor Enes 0fed4c7e55 Return NotFound error when trait does not exist (#20412)
We were returning a trace.BadParameter, however we should return
trace.IsNotFound.
The godoc suggests that error.
The tests suggests that error, but they were only matching for type
which is the same for all the trace.XYZ errors.

Tests are now using the `trace.Is<Error>` helper method to correctly
validate the error message.

The side effect of this change is that we were receiving a lot of logs
when interpolating traits in a role.
That log is supressed when the error is NotFound.
That was not the case before this commit: the error was a BadParameter
one, so the log is written (as debug, but still a lot of noise).

Co-authored-by: Vitor Enes <vitor.duarte@goteleport.com>
2023-01-20 12:51:04 +00:00
..
2022-06-18 21:28:07 +00:00