retry on HTTP 50X Error when calling Chef REST API

the default retry times for chef-client is 5. So here I match 5/5 to ensure it retries 5 times. Should we read the setting for retry times from Chef::Config and match it ?