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