Unknown error
dmlo opened this issue · 2 comments
dmlo commented
Good morning OpenWhisk. I'm trying to hook up a test action to a Postgres database like so:
var conn = new NpgsqlConnection(connectionString);
var cmd = new NpgsqlCommand("INSERT INTO base_entity (name) VALUES ('danny')", conn);
cmd.ExecuteNonQuery();
I am getting this error message:
C:\Users\dmlod>wsk -i activation logs 7c5b1161098b41239b1161098b012371
2020-04-01T10:41:48.142980549Z stdout: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
2020-04-01T10:41:48.143031669Z stdout: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
2020-04-01T10:41:48.143036509Z stdout: at Apache.OpenWhisk.Runtime.Common.Run.HandleRequest(HttpContext httpContext) in /app/Apache.OpenWhisk.Runtime.Common/Run.cs:line 90
2020-04-01T10:41:48.175771203Z stderr: The action did not initialize or run as expected. Log data might be missing.
Connection string is verified ok. DB is operational. OpenWhisk will run the action if I comment out the 'ExecuteNonQuery' line.
Two questions:
- Any idea where I've dropped the ball here?
- Is there a way to get a more detailed error message?
Thank you for your time and I hope you're not too bored in quarantine.
dmlo commented
In the end I was able to discover the error by using a try/catch block and outputting a string to Html.