9 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
sophia
49280286ad Strip new lines from error details
The error details message should just be one string without spacing
so the terminal can set a output length. This will allow messages
from Ruby and Go errors to have similar formating.
2022-09-19 15:14:42 -04:00
sophia
add66c4c2a Include message in rpc status error from ruby 2022-09-19 15:14:42 -04:00
Paul Hinze
1341bfe0af
Tweak Ruby->Go error handling so exit codes match
In legacy Vagrant, any exception raised that's a subclass of
Vagrant::Errors::VagrantError is considered user-facing and so causes
the error message to be printed to the console and the process to use
exit code 1. Anything outside of that causes the process to use exit
code 255. (See `bin/vagrant` for the code.)

Here we mirror that behavior by treating errors that have a
LocalizedMessage as user-facing and those without as unexpected. This
allows the basic virtualbox component to pass in vagrant-spec!
2022-04-25 12:26:49 -05:00
Paul Hinze
09c03893b2
Simplify truncate_to per feedback
No need to spin up a full regexp if it's not necessary!
2022-04-25 12:26:49 -05:00
Paul Hinze
253c6658b3
Truncate error message to address RST_STREAM issues
This is the result of a whole journey of learning about GRPC errors! See
the hefty inline comment which has all the context for future
generations.
2022-04-25 12:26:49 -05:00
sophia
f3a1a9caa6
Add dependency on common protos for error details 2022-04-25 12:26:24 -05:00
sophia
deb667ecd3
Use common rpc errdetails messages 2022-04-25 12:26:20 -05:00
sophia
df5f7d40e8
Rename exception logger to exception transformer
The exception logger no longer logs errors. Instead it transforms
the errors into a grpc friendly format. The exception that would
have been logged at this point gets logged when the task completes.
2022-04-25 12:26:20 -05:00