pulumi/sdk/nodejs/proto
Thomas Gummerer 49efdabede
allow component providers to return more detailed error messages (#17306)
This is based on work from @lunaris and @EronWright, to allow us to
return better error messages from component providers.

The basic idea here is to allow attaching more error details on the RPC
layer, and turn errors into diagnostic *in the engine*, to avoid the
need to do fix the error up in every SDK and pretty print it.

GRPC allows us to attach error details to the returned error to help us
with that. These details can be error details such as specified in the
`error_details` proto that comes with grpc, but can also take any other
shape. Currently we only support pretty printing select types from that
proto, but this can be extended in the future.

On the implementation side, Go has a pretty nice API to create these
errors, which we can just let users use directly. For Python and NodeJS
the API is not so nice for this, so we need to encapsulate the error
into a special exception, and then turn that into a proper GRPC message,
using the magic `grpc-status-details-bin` metadata field.

For both Python and NodeJS I've only implemented one class for errors so
far, as I'm interested in some feedback on the API design first. I'm
wondering if we should just let users specify the fields as tuples, and
then add them to the `error_details` proto? Very open to ideas here.

Closes: https://github.com/pulumi/pulumi/pull/16132

---------

Co-authored-by: Will Jones <will@sacharissa.co.uk>
Co-authored-by: Eron Wright <eron@pulumi.com>
2024-09-25 15:38:36 +00:00
..
codegen Copy Parameterization to the codegen package (#17098) 2024-08-29 13:45:51 +00:00
testing Add LanguageInfo to conformance tests (#17315) 2024-09-20 10:34:17 +00:00
alias_grpc_pb.js feat(engine): Adds structured alias support to the engine 2022-10-11 17:56:32 -04:00
alias_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
alias_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
analyzer_grpc_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
analyzer_grpc_pb.js Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
analyzer_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
analyzer_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
callback_grpc_pb.d.ts Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
callback_grpc_pb.js Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
callback_pb.d.ts Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
callback_pb.js Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
converter_grpc_pb.d.ts Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
converter_grpc_pb.js Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
converter_pb.d.ts Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
converter_pb.js Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
engine_grpc_pb.d.ts debugging: more consistency for naming (#17152) 2024-09-04 10:36:45 +00:00
engine_grpc_pb.js debugging: more consistency for naming (#17152) 2024-09-04 10:36:45 +00:00
engine_pb.d.ts debugging: more consistency for naming (#17152) 2024-09-04 10:36:45 +00:00
engine_pb.js debugging: more consistency for naming (#17152) 2024-09-04 10:36:45 +00:00
errors_grpc_pb.js Regenerate protocol buffers code 2020-02-28 11:53:47 +00:00
errors_pb.d.ts allow component providers to return more detailed error messages (#17306) 2024-09-25 15:38:36 +00:00
errors_pb.js allow component providers to return more detailed error messages (#17306) 2024-09-25 15:38:36 +00:00
language_grpc_pb.d.ts Query language runtime for options during “pulumi new” (#16346) 2024-06-17 17:10:55 +00:00
language_grpc_pb.js Query language runtime for options during “pulumi new” (#16346) 2024-06-17 17:10:55 +00:00
language_pb.d.ts debugging: more consistency for naming (#17152) 2024-09-04 10:36:45 +00:00
language_pb.js debugging: more consistency for naming (#17152) 2024-09-04 10:36:45 +00:00
plugin_grpc_pb.js Regenerate protocol buffers code 2020-02-28 11:53:47 +00:00
plugin_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
plugin_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
provider_grpc_pb.d.ts Add Paramaterize to provider interface (#16174) 2024-05-15 16:22:39 +00:00
provider_grpc_pb.js Document secrets configure behavior (#17348) 2024-09-24 12:29:22 +00:00
provider_pb.d.ts Send resource name and type as well as URN to providers (#17177) 2024-09-06 09:29:37 +00:00
provider_pb.js Send resource name and type as well as URN to providers (#17177) 2024-09-06 09:29:37 +00:00
resource_grpc_pb.d.ts implement engine support for invoke transforms (#16559) 2024-07-11 16:01:44 +00:00
resource_grpc_pb.js implement engine support for invoke transforms (#16559) 2024-07-11 16:01:44 +00:00
resource_pb.d.ts Add parameterized `Call` support to the engine (#16813) 2024-07-26 15:36:53 +00:00
resource_pb.js Add parameterized `Call` support to the engine (#16813) 2024-07-26 15:36:53 +00:00
source_grpc_pb.js [engine] Add support for source positions 2023-07-10 14:35:40 -07:00
source_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
source_pb.js Fix recursive fixups in JavaScript protobuf generation (#14424) 2023-11-10 13:31:14 +00:00
status_grpc_pb.js Regenerate protocol buffers code 2020-02-28 11:53:47 +00:00
status_pb.d.ts Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
status_pb.js Compile protobufs with "pulumi" namespace (#10074) 2022-07-12 14:45:03 +01:00