diff --git a/src/onedrive.d b/src/onedrive.d index 063d156e..f3962ab4 100644 --- a/src/onedrive.d +++ b/src/onedrive.d @@ -800,23 +800,19 @@ final class OneDriveApi // 503 - Service Unavailable // 504 - Gateway Timeout (Issue #320) case 500: - // No actions - log.vlog("OneDrive returned a 'HTTP 500 Internal Server Error' - gracefully handling error"); + // Throw this as a specific exception so this is caught throw new OneDriveException(http.statusLine.code, http.statusLine.reason, response); case 502: - // No actions - log.vlog("OneDrive returned a 'HTTP 502 Bad Gateway Error' - gracefully handling error"); + // Throw this as a specific exception so this is caught throw new OneDriveException(http.statusLine.code, http.statusLine.reason, response); case 503: - // No actions - log.vlog("OneDrive returned a 'HTTP 503 Service Unavailable Error' - gracefully handling error"); + // Throw this as a specific exception so this is caught throw new OneDriveException(http.statusLine.code, http.statusLine.reason, response); case 504: - // No actions - log.vlog("OneDrive returned a 'HTTP 504 Gateway Timeout Error' - gracefully handling error"); + // Throw this as a specific exception so this is caught throw new OneDriveException(http.statusLine.code, http.statusLine.reason, response); // Default - all other errors that are not a 2xx or a 302