Skip to content

Declared in <galanthus/c_api/gln_capi.h>.

GLN_API const gln_error_t* GLN_CALL gln_get_backend_result_error(const gln_backend_result_t* in_result);
  • Family: Backend result accessors
  • Return type: const gln_error_t*

Purpose

Returns the borrowed error object stored in a backend result envelope when the envelope represents a local error or provider rejection.

The accessor returns NULL for envelopes whose outcome is neither GLN_BACKEND_OUTCOME_ERROR nor GLN_BACKEND_OUTCOME_REJECTED.

Return

Returns the borrowed error detail stored in a backend result envelope when one is available.

TypeNullabilityOwnership
const gln_error_t*nullableborrowed

Parameters

NameDirectionTypeNullabilityOwnership
in_resultinputconst gln_backend_result_t*nullableborrowed

Notes

Passing NULL for in_result is allowed and returns NULL.

The returned gln_error_t is owned by the backend result envelope. Do not pass it to gln_release_error; gln_destroy_backend_result releases the embedded error with the envelope.

Strings in the returned error and any structured detail handle borrowed with gln_get_error_detail become invalid when gln_destroy_backend_result releases the parent envelope. Copy needed fields before destroying the result.

See Also