|
116 | 116 | import static ml.comet.experiment.impl.constants.QueryParamName.TYPE; |
117 | 117 | import static ml.comet.experiment.impl.constants.QueryParamName.WORKSPACE_NAME; |
118 | 118 | import static ml.comet.experiment.impl.http.ConnectionUtils.checkResponseStatus; |
| 119 | +import static ml.comet.experiment.impl.resources.LogMessages.NO_RESPONSE_RETURNED_BY_REMOTE_ENDPOINT; |
| 120 | +import static ml.comet.experiment.impl.resources.LogMessages.getString; |
119 | 121 | import static ml.comet.experiment.impl.utils.RestApiUtils.artifactDownloadAssetParams; |
120 | 122 | import static ml.comet.experiment.impl.utils.RestApiUtils.artifactVersionDetailsParams; |
121 | 123 | import static ml.comet.experiment.impl.utils.RestApiUtils.artifactVersionFilesParams; |
@@ -497,15 +499,15 @@ private Single<RestApiResponse> singleFromSyncPostWithRetriesEmptyBody(@NonNull |
497 | 499 | return this.connection.sendPostWithRetries(JsonUtils.toJson(payload), endpoint, true) |
498 | 500 | .map(body -> Single.just(new RestApiResponse(200, body))) |
499 | 501 | .orElse(Single.error(new CometApiException( |
500 | | - String.format("No response was returned by endpoint: %s", endpoint)))); |
| 502 | + getString(NO_RESPONSE_RETURNED_BY_REMOTE_ENDPOINT, endpoint)))); |
501 | 503 | } |
502 | 504 |
|
503 | 505 | private Single<RestApiResponse> singleFromSyncGetWithRetries(@NonNull String endpoint, |
504 | 506 | @NonNull Map<QueryParamName, String> params) { |
505 | 507 | return this.connection.sendGetWithRetries(endpoint, params, true) |
506 | 508 | .map(body -> Single.just(new RestApiResponse(200, body))) |
507 | 509 | .orElse(Single.error(new CometApiException( |
508 | | - String.format("No response was returned by endpoint: %s", endpoint)))); |
| 510 | + getString(NO_RESPONSE_RETURNED_BY_REMOTE_ENDPOINT, endpoint)))); |
509 | 511 | } |
510 | 512 |
|
511 | 513 | private <T> Single<T> singleFromSyncGetWithRetries(@NonNull String endpoint, |
|
0 commit comments