Review comment: Include the error code being returned

This commit is contained in:
root 2018-07-06 03:03:57 -04:00
parent ad5349a488
commit 4177d8bd3b

View File

@ -2071,11 +2071,11 @@ int S3fsCurl::RequestPerform(void)
// Service response codes which are >= 400 && < 500
switch(LastResponseCode){
case 400:
S3FS_PRN_ERR("HTTP response code %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
S3FS_PRN_ERR("HTTP response code %ld, Returning EIO, Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
return -EIO;
case 403:
S3FS_PRN_ERR("HTTP response code %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
S3FS_PRN_ERR("HTTP response code %ld, Returning EPERM, Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
return -EPERM;
case 404:
@ -2084,7 +2084,7 @@ int S3fsCurl::RequestPerform(void)
return -ENOENT;
default:
S3FS_PRN_ERR("HTTP response code %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
S3FS_PRN_ERR("HTTP response code %ld, Returning EIO, Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
return -EIO;
}
break;