Log the error text with every permission failure, at debug and error
level, and the texts of both errors when a fallback returns a different
error than the first attempt.
Log gateway selection failures in the share helpers at error level with
the request id and, where available, the permission id, so they can be
matched with the entry of the calling operation.
Use constants for the log keys, the recipient types and the tracer name,
log the space type of unsupported spaces and the user id of the shared
by me listing, and log an unknown permission type when deleting.
Assisted-by: Claude Code:claude-opus-5-5