Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Enabled function returns Error when Empty value is passed #148

Open
michael-w-williams opened this issue Sep 7, 2018 · 3 comments
Open
Assignees

Comments

@michael-w-williams
Copy link
Member

After the adding JSON support for Java Fn function, if the function is passed an empty value, Fn returns:

{"message":"container exit code 2"}

Fn: Error calling function: status 502

The function does work with JSON data. If you pass:

{"name":"Bob"}

or even

{"name":""}

the function works fine. Tried modifying the function to test for null and isEmpty. Nothing like that worked. I'm guessing the function is throwing an uncaught exception.

May be related to 392 or 1192

Mike W.

@shaunsmith
Copy link
Contributor

The error is pretty clear that an attempt to convert null to an an object failed. Null input should result in a null object passed to the function handler.

{ "message":"Unhandled internal error in FDK", "detail":"An exception was thrown during Input Coercion: Failed to coerce event to user function parameter type class com.example.fn.HelloFunction$Input"}

@shaunsmith
Copy link
Contributor

@rikgibson can you take a look at this? I'd rather we fixed this bug than have to add warning text to the Java tutorial (fnproject/tutorials#149).

@CC007
Copy link

CC007 commented Jul 17, 2020

What is the status on this issue?

@CC007 CC007 unassigned tteggel and mjg123 Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants