Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix inconsistency between
SendResult
and other results (#60)
Almost all other results: * `NewProfileExporterV3Result` * `SerializeResult` * `PushTagResult` expose a `...Result_Tag` named `..._RESULT_ERR` and an `err` field inside their definition, so it's weird to use `failure` just for `SendResult`, which otherwise looks exactly like all the others. Here's how `ffi.h` looks after this change: ```diff typedef enum ddprof_ffi_SendResult_Tag { DDPROF_FFI_SEND_RESULT_HTTP_RESPONSE, - DDPROF_FFI_SEND_RESULT_FAILURE, + DDPROF_FFI_SEND_RESULT_ERR, } ddprof_ffi_SendResult_Tag; typedef struct ddprof_ffi_SendResult { @@ -150,7 +150,7 @@ struct ddprof_ffi_HttpStatus http_response; }; struct { - struct ddprof_ffi_Vec_u8 failure; + struct ddprof_ffi_Vec_u8 err; }; }; } ddprof_ffi_SendResult; ``` The `ParseTagsResult` is still inconsistent (uses `error_message`) but that one is inconsistent in other ways (doesn't expose a tag, uses a pointer to a Vec_u8), so I think it's not a bad idea that `error_message` is different as it needs to be handled differently.
- Loading branch information