Results 103 comments of Liu Wei

`grpc-status-details-bin` is encoded with marshalling followed by base64, we need the proto to unmarshall. I have no idea how to upload proto file, and decode it with lua. Here is...

I'm going to add 2 configuration items 1. `cpy_err_details_to_body`: if true, copy `grpc-status-details-bin` to response body, the one in response header won't be deleted { "error": { grpc-status-details-bin: "CA4SDk91dCBvZiBzZXJ2aWNlGlcKKnR5cGUuZ29vZ2xlYXBpcy5jb20vaGVsbG93b3JsZC5FcnJvckRldGFpbBIpCAESHFRoZSBzZXJ2ZXIgaXMgb3V0IG9mIHNlcnZpY2UaB3NlcnZpY2U" }...

> ``` local encoded_data = "CA4SDk91dCBvZiBzZXJ2aWNlGlcKKnR5cGUuZ29vZ2xlYXBpcy5jb20vaGVsbG93b3JsZC5FcnJvckRldGFpbBIpCAESHFRoZSBzZXJ2ZXIgaXMgb3V0IG9mIHNlcnZpY2UaB3NlcnZpY2U" local decoded_data = ngx_decode_base64(encoded_data) local data = pb.decode("ErrorStatus", decoded_data) data = data.details[1].value local data = pb.decode("ErrorDetail", data) ``` Need to specify the proto name...

``` message ErrorDetail { int64 code = 1; string message = 2; string type = 3; } local data = pb.decode("ErrorDetail", data) ``` message type ?

What you suggest is only part of the decoding. The part below (error details part) can be customized ``` repeated google.protobuf.Any details = 3; ``` like I have mentioned: https://github.com/apache/apisix/issues/6996#issuecomment-1180516199...

`show_status_in_body`, optional, when enabled, will show decoded `grpc-status-details-bin` in response body `status_detail_type`, optional, the message type of the `grpc-status-details-bin`'s `details` part, if not given, the `details` part will not be...