JHoelli opened a new issue, #4727:
URL: https://github.com/apache/streampipes/issues/4727

   ### Apache StreamPipes version
   
   dev (current development state)
   
   ### Affected StreamPipes components
   
   Backend
   
   ### What happened?
   
   Using byName on DataLakeMeasureResource via the Client API throws an 
exception instead of returning an Optional, if the name does not already exist. 
Return 403, Forbidden in such cases makes sense as the resource does not yet 
exist. However, this should not result in an exception. 
   
   When calling getByDatasetName(String datasetName), the method signature 
suggests that missing or inaccessible resources are represented as 
Optional.empty(). In practice, this is only true for 404 Not Found.
   If the backend responds with 403 Forbidden, the client throws a 
SpHttpErrorStatusCode instead of returning an Optional. This makes the behavior 
surprising for client code that expects the result to be modeled consistently 
through Optional.
   
   ### How to reproduce?
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Additional technical information
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   None


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to