plusplusjiajia opened a new pull request, #23:
URL: https://github.com/apache/terraform-provider-paimon/pull/23

     ## Problem
   
     A write refused with HTTP 404 is reported as:
   
     ```
     Paimon REST API returned HTTP 404 with code 404
     ```
   
     For permission and policy resources that almost always means the principal 
does not exist, but the response body that says so is discarded, so it reads 
like a routing problem.
   
     ## Changes
   
     - `APIError.Error()` appends the structured `resourceType` / 
`resourceName` fields of the REST `ErrorResponse`, e.g. `USER "analyst" not 
found` on 404 and `for TABLE "db.t"` on other statuses. The free-text `message` 
stays hidden.
     - These fields are printed only when safe: `resourceType` must be one of 
the contract's values, and `resourceName` must be an identifier the client 
itself sent in the request (path, query, or an identity key in the body, 
optionally two joined by a dot). Server-chosen values (catalog prefix, page 
tokens) and user data (options, comments, policy content) never qualify, so a 
server cannot echo anything into Terraform's output.
     - Permission, row-filter and column-mask writes add a hint on 404 saying 
what the server could not find. The hint survives the replace-and-restore path 
and is skipped when the 404 came from loading `/v1/config`.
   
     ## Tests
   
     Unit tests cover the structured fields, reflection attempts (tokens, 
prefixes, combining marks, option values, page tokens, oversized names), 
identifiers from every request body shape, and the provider hints on create, 
update and config failure. `make check`, `golangci-lint` and `make 
test-acceptance` pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to