Skip to content

Conversation

@bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Apr 29, 2025

chore: add conformance tests for ApiException:: getErrorDetails

This fixes an issues from GAPIC Showcase where REST and gRPC return different error details.

See @gapic-generator-php/tests/Conformance/ShowcaseTest.php

Also see https://google.aip.dev/193

Is it okay to hardcode grpc-status-details-bin?

(this seems to be OK, according to protobuf README), but I still don't understand how grpc-status-details-bin works. For PHP this is where google.rpc.Status message is encoded. I am guessing it gets thrown into the error response (which is a PHP Standard Object, and NOT a protobuf message) because it wants to provide an error message that ISN'T a protobuf message (in case that class doesn't exist).

There's still ONE detail that I haven't found documented anywhere, which is, the grpc-status-details-bin is an ARRAY... so does that mean there can be multiple statuses returned in an error?

@bshaffer bshaffer force-pushed the surface-errors-betterbrent branch from 0517098 to c5e2d82 Compare January 16, 2026 20:10
@bshaffer bshaffer marked this pull request as ready for review January 16, 2026 20:10
@bshaffer bshaffer requested a review from a team as a code owner January 16, 2026 20:10
@bshaffer bshaffer changed the title surface errors: add fix for compliance feat: support grpc-status-details-bin, add conformance tests for ApiException::getErrorDetails Jan 16, 2026
@bshaffer bshaffer changed the title feat: support grpc-status-details-bin, add conformance tests for ApiException::getErrorDetails feat: support grpc-status-details-bin for ApiException::getErrorDetails and add conformance tests Jan 16, 2026
@bshaffer bshaffer changed the title feat: support grpc-status-details-bin for ApiException::getErrorDetails and add conformance tests feat: support grpc-status-details-bin for ApiException::getErrorDetails Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants