fdk-java
fdk-java copied to clipboard
Separate input validation errors, FunctionInputHandlingException and other errors
There are several cases where we throw a FunctionInputHandlingException on valid user input:
- The function format is invalid (not
defaultorhttp), which is a configuration error - We can't find an invoker that can run the function, which is a programming error
- We have an IOException reading the input stream, which is likely a programming error (read after close)
At the same time, we don't have an exception for a genuine input validation issue.
So we need to:
- separate programming/configuration issues from i/o issues, and use the right exceptions for those
- create a new exception to represent genuinely wrong input