@VisibleForTesting
    void writeErrorDetails(
            ServiceRequestContext ctx, List<Any> details, JsonGenerator jsonGenerator) throws IOException {
        jsonGenerator.writeStartArray();
        for (Any detail : details) {
            try {
                jsonMarshaller.writeValue(detail, jsonGenerator);
            } catch (IOException e) {
                logger.warn("Unexpected exception while writing an error detail to JSON." +
                            " ctx: '{}', detail: '{}'", ctx, detail, e);
            }
        }
        jsonGenerator.writeEndArray();
    }
Returns a JSON response based on Google APIs.
Please refer to <a href="https://cloud.google.com/apis/design/errors#error_model">Google error model</a>

@param ctx the service context.
@param status the gRPC {@link Status} code.
@param response the gRPC response.

@return the {@link HttpResponse}.
grpc/src/main/java/com/linecorp/armeria/server/grpc/JsonUnframedGrpcErrorHandler.java