In a project using a MySQL db, Job.ErrorMessage always returns "Internal server error" whatever error occurs on the DB side so I cannot do anything with it. It's because, in HttpUtils2Service, the ErrorResponse is sent to the log, and not returned to the program!
Sub hc_ResponseError (Response As OkHttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Dim ErrMsg As String = Reason
If Response <> Null Then
ErrMsg = ErrMsg & CRLF & Response.ErrorResponse
Log(Response.ErrorResponse.Replace("\n", CRLF))
Response.Release
End If
CompleteJob(TaskId, False, ErrMsg)
End Sub