Zooflow: Actually show errors in service calls

This commit is contained in:
Jonathan Jenne
2021-12-14 12:19:40 +01:00
parent 44e273137d
commit 6a182d60c8
2 changed files with 34 additions and 17 deletions

View File

@@ -187,7 +187,7 @@ Public Class Client
pObjectKind As String,
pBusinessEntity As String,
Optional pImportOptions As Options.ImportFileOptions = Nothing
) As Task(Of Long)
) As Task(Of ImportFileResponse)
Try
' Set default options
If pImportOptions Is Nothing Then
@@ -233,16 +233,13 @@ Public Class Client
.ProfileId = pProfileId,
.AttributeValues = pAttributeValues.ToArray
})
If oFileImportResponse.OK = False Then
Throw New ApplicationException("Could not Import File Contents!")
End If
Return oFileImportResponse.ObjectId
Return oFileImportResponse
End Using
End Using
Catch ex As Exception
_logger.Error(ex)
Return INVALID_OBEJCT_ID
Return Nothing
End Try
End Function