exceptionfactory commented on code in PR #8484:
URL: https://github.com/apache/nifi/pull/8484#discussion_r1542112684


##########
nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/RestLookupService.java:
##########
@@ -172,6 +173,20 @@ public class RestLookupService extends 
AbstractControllerService implements Reco
         .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)
         .build();
 
+    static final AllowableValue PASS_THROUGH = new 
AllowableValue("Pass-through",
+            "Pass-through","sends successful and unsuccessful HTTP responses 
to the caller");
+    static final AllowableValue HANDLE = new AllowableValue("Handle Service 
Errors",
+            "Handle Service Errors", "generates an exception when an 
unsuccessful HTTP response code is received");
+    public static final PropertyDescriptor PROP_RESPONSE_CODE_HANDLING = new 
PropertyDescriptor.Builder()
+        .name("rest-lookup-response-code-handling")
+        .displayName("Response Code Handling Strategy")

Review Comment:
   On further consideration, what do you think of naming this `Response 
Handling Strategy` with values of `Returned` and `Evaluated`? Open to 
additional suggestions, but having a single word could be useful, with the 
description indicating all responses and response codes are returned, or the 
response code is evaluated for success or failure based on standard HTTP 
conventions?



##########
nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/RestLookupService.java:
##########
@@ -172,6 +173,20 @@ public class RestLookupService extends 
AbstractControllerService implements Reco
         .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)
         .build();
 
+    static final AllowableValue PASS_THROUGH = new 
AllowableValue("Pass-through",
+            "Pass-through","sends successful and unsuccessful HTTP responses 
to the caller");
+    static final AllowableValue HANDLE = new AllowableValue("Handle Service 
Errors",
+            "Handle Service Errors", "generates an exception when an 
unsuccessful HTTP response code is received");

Review Comment:
   Declaring these options as an `enum` that implements `DescribedValue` makes 
it easier to refer to the parsing value of the property. Recommend naming the 
enum `ResponseHandlingStrategy`.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

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

Reply via email to