In its current form, if an error message has two trailing "\n" instead of one, an empty line is resulted (see engine/job.go for an example of such usages). Skipping all trailing whitespaces will give a better error message. Signed-off-by: Nghia Tran <nghia@google.com> Upstream-commit: b422d8da8f1d1e51da6cfff4890e6a08252da7c5 Component: engine