You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The format of the blob needs to be json, for example:
book.json -> { "id": "1", "name": "mybook" }
If you don't do that and use a blob with string content, the deserialization will fail with an error that looks like this:
Executed 'Functions.BlobInputBookArrayFunction' (Failed, Id=501b3023-ee56-41f4-a99d-332bba664544, Duration=66ms)
[2023-02-09T21:45:01.210Z] System.Private.CoreLib: Exception while executing function: Functions.BlobInputBookArrayFunction. System.Private.CoreLib: Result: Failure
[2023-02-09T21:45:01.210Z] Exception: Microsoft.Azure.Functions.Worker.FunctionInputConverterException: Error converting 1 input parameters for Function 'BlobInputBookArrayFunction': Cannot convert input parameter 'books' to type 'SampleApp.Book[]' from type
'Microsoft.Azure.Functions.Worker.Grpc.Messages.GrpcCollectionModelBindingData'. Error:System.Text.Json.JsonException: 'h' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
We should consider improving the logging here. This exception is currently caught in our try-catch so this would be a good place to display a better error message:
Flagging to investigate what, if any, enhancements we can make to this.
liliankasem
changed the title
Improve error logging when deserialization fails for POCO scenarios
Improve error logging when deserialization fails for POCO scenarios (blob converter)
Feb 16, 2023
liliankasem
changed the title
Improve error logging when deserialization fails for POCO scenarios (blob converter)
[Blob Converter] Improve error logging when deserialization fails for POCO scenarios
Feb 16, 2023
liliankasem
changed the title
[Blob Converter] Improve error logging when deserialization fails for POCO scenarios
[SDK Binding - Blob] Improve error logging when deserialization fails for POCO scenarios
Feb 17, 2023
If you bind to a POCO i.e.
[BlobInput("book-container", IsBatched = true)] Book[] books)
The format of the blob needs to be json, for example:
book.json ->
{ "id": "1", "name": "mybook" }
If you don't do that and use a blob with string content, the deserialization will fail with an error that looks like this:
We should consider improving the logging here. This exception is currently caught in our try-catch so this would be a good place to display a better error message:
azure-functions-dotnet-worker/extensions/Worker.Extensions.Storage.Blobs/src/BlobStorageConverter.cs
Lines 87 to 103 in f6cf04a
The text was updated successfully, but these errors were encountered: