RetroAchievements / rcheevos

Library to parse and evaluate achievements and leaderboards for RetroAchievements
MIT License
90 stars 34 forks source link

allow client to pass custom errors through http callback #285

Closed Jamiras closed 1 year ago

Jamiras commented 1 year ago

More generic solution for #283

The client can set rc_api_server_response_t.http_status_code to RC_API_SERVER_RESPONSE_CLIENT_ERROR or RC_API_SERVER_RESPONSE_RETRYABLE_CLIENT_ERROR and then put the error message in rc_api_server_response_t.body.

RC_API_SERVER_RESPONSE_RETRYABLE_CLIENT_ERROR indicates a non-fatal error (such as timeout) that should be retried for critical messages like achievement unlocks.