fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] vorburger commented on a change in pull request #1486: Bump ancient OkHTTP & Retrofit in Hooks (FINERACT-1252)
Date Tue, 03 Nov 2020 13:29:46 GMT

vorburger commented on a change in pull request #1486:
URL: https://github.com/apache/fineract/pull/1486#discussion_r516484425



##########
File path: fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java
##########
@@ -282,15 +282,10 @@ private void validateHookRules(final HookTemplate template, final Set<HookConfig
             if (conf.getFieldName().equals(payloadURLName)) {
                 try {
                     final WebHookService service = processorHelper.createWebHookService(fieldValue);
-                    service.sendEmptyRequest();
-                } catch (RetrofitError re) {
-                    // Swallow error if it's because of method not supported or
-                    // if url throws 404 - required for integration test,
-                    // url generated on 1st POST request
-                    if (re.getResponse() == null) {
-                        String errorMessage = "url.invalid";
-                        baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode(errorMessage);
-                    }
+                    service.sendEmptyRequest().execute();
+                } catch (IOException re) {
+                    String errorMessage = "url.invalid";

Review comment:
       I was also wondering, but the integration tests all still pass now, so looks like this
actually wasn't needed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message