microsoftgraph / msgraph-sdk-android

Microsoft Graph SDK for Android! https://graph.microsoft.io
Other
51 stars 43 forks source link

isError(GraphErrorCodes.QuotaLimitReached) is not working for "Insufficient Storage" #92

Closed ajay-singh-wdc closed 4 years ago

ajay-singh-wdc commented 5 years ago

I am not able to compare the error scenario for "Insufficient Storage" while uploading a file Below is the code snippet for failure case while upload :

@Override public void failure(ClientException ex) { Timber.e(ex, ex.getMessage()); if (ex.isError(GraphErrorCodes.QuotaLimitReached)) { // show message to user } }

The exception received here is of type GraphFatalServiceException Below are the logs :

E/DefaultHttpProvider[sendRequestInternal] - 333: OneDrive Service exception [This is an unexpected error from Graph, please report this at https://github.com/microsoftgraph/msgraph-sdk-android/issues] E/OneDriveAdapter: [This is an unexpected error from Graph, please report this at https://github.com/microsoftgraph/msgraph-sdk-android/issues] E/OneDriveAdapter: PUT https://graph.microsoft.com/v1.0/me/drive/items/D8ABD5876309A893!871/children/20180820_180525.jpg/content E/OneDriveAdapter: SdkVersion : graph-android-v1.6.0 E/OneDriveAdapter: Authorization : bearer EwBoA8l6BAAURSN/FHlDW5xN74t6GzbtsBBeBUYAAZ1jJufBxhmm0nOtpymt2D3pa6n2TnYFlcT+N42eaZY8w+uHb8CzI/cyUrCg6uB1SJO850eRJfNFg8mY4oFWa1k6ls6dWzr8UF+tNeREIpI598SzuxjkSjvgTQwtuCziIqLw9F5guijhkuq5sBgATky5kZ+rUPC7hCNLXqFAJr7NFd7pWLfHa+0UCVori8JYAY08WpDEAlcA9Ghvo0U5/LfP0bFMRNioXBAaceB8TPcfKpEduphG2M6y8EgRi8H8fQnqhcddBHxEIL2XYRtvmCBnzxIjDNOISQDdfZiPdaK9IXPrisA/QJXJms6wo2vqGrnlHQEL0SXwjRkW9dHhSA4DZgAACPkenmtlACewOAK4Lpe5BgTu6JPYE0Aato/nsbkmjUSt6GS+8EUFypRtIdugpDiPGSfv3I2zJZhI+UZNWkqpbp9OZAWaK1Vo9fYGcBu6yUimkgEr62a7u0cv76ws6kJrAwwuXqpqPeelldD/mRnPdXPVV/6BvY/mw4hoKP8IMwz02UkmQMjRMTAZ90R4CGcr/mxJ9I7XQNJB1Bi9nNVk4gR2aVk9o3+YgfUyLF9sOFtZBfxzhmzY+nkgpG5yuOvPmKOuuAC4Z8dbbGaO0P31mIZX9V1j39eR2WxeiKzMOQg0mhDDRp6egXc2AVpFSbgVIWipYWxjxs+PShOdhZiLYe3UZEKNYEYA7sFYB8IZRalGrIZYodJF+OSN1kCHShP1rA7qBb/vzZGGdhEF7JeTi6CSLtOyCnEj9fBFUNXprsocdwOirWCeMVi8Tw9On3SxXpGKIrDmv6sYt8pVkhHs1RansJgfzI7SQRoC6L8ueovvk2W8Mmxm3l5R3xGGygaMp0liJp0OMtCKTTYvz8obGrOTumjLowfcXXeOPKEz6N7ERUkSvol4+aQ/Ui960KaChO6QVJ6OTh/iSyp2iu8H3XoQUNcv46Kzf/ePiuG+3ARqr1TGVgzI0qKv+7kqTfcHBJTKe/po6fKvxAG/3qnPOxu7AsUkJXEx+mkmEINjQPqOiSJDy3HIKSnY+tOv+/pBZFJ5EgTAECYUoHyOlRZwe4wEoO5zFhvaP7X3409l/fMf4qoLbS6LLQOz307/Zz7+Npr4hgI= E/OneDriveAdapter: byte[3397030] {-1, -40, -1, -31, 36, 68, 69, 120, [...]} E/OneDriveAdapter: 507 : Insufficient Storage E/OneDriveAdapter: Duration : 9819.2337 E/OneDriveAdapter: Cache-Control : private E/OneDriveAdapter: x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"SliceC","Ring":"3","ScaleUnit":"001","Host":"AGSFE_IN_8","ADSiteName":"SEA"}} E/OneDriveAdapter: request-id : cfc437b6-c395-4a2b-a63b-65edcc5d1114 E/OneDriveAdapter: X-Android-Selected-Protocol : http/1.1 E/OneDriveAdapter: X-Android-Response-Source : NETWORK 507 E/OneDriveAdapter: client-request-id : cfc437b6-c395-4a2b-a63b-65edcc5d1114 E/OneDriveAdapter: X-Android-Sent-Millis : 1539597296908 E/OneDriveAdapter: Content-Type : application/json E/OneDriveAdapter: Date : Mon, 15 Oct 2018 09:52:13 GMT E/OneDriveAdapter: Transfer-Encoding : chunked E/OneDriveAdapter: Strict-Transport-Security : max-age=31536000 E/OneDriveAdapter: X-Android-Received-Millis : 1539597308090 E/OneDriveAdapter: { E/OneDriveAdapter: "error": { E/OneDriveAdapter: "code": "quotaLimitReached", E/OneDriveAdapter: "message": "Insufficient Space Available", E/OneDriveAdapter: "innerError": { E/OneDriveAdapter: "request-id": "cfc437b6-c395-4a2b-a63b-65edcc5d1114", E/OneDriveAdapter: "date": "2018-10-15T09:52:13" E/OneDriveAdapter: } E/OneDriveAdapter: } E/OneDriveAdapter: } E/OneDriveAdapter: com.microsoft.graph.http.GraphFatalServiceException: [This is an unexpected error from Graph, please report this at https://github.com/microsoftgraph/msgraph-sdk-android/issues]

baywet commented 4 years ago

Hi everyone, Thank you for the contribution, we have moved away from an android specific SDK to a Java SDK and this repo will be archived very soon. If you're still facing the same issue with the Java SDK, feel free to re-open an issue over there. Closing.