@@ -391,10 +391,6 @@ static object GetRequestContentContent(
391391 // Checking if caller supplied a [payload] value or not, alternatives are structured lambda object.
392392 if ( payloadNode . Value == null )
393393 {
394- // Verifying user supplied some sort of structured lambda object type of content.
395- if ( ! payloadNode . Children . Any ( ) )
396- throw new HyperlambdaException ( $ "No [payload] value or children supplied to [{ input . Name } ]") ;
397-
398394 // Figuring out Content-Type of request payload to make sure we correctly transform into the specified value.
399395 var contentType = headers . ContainsKey ( "Content-Type" ) ?
400396 ContentType . Parse ( headers [ "Content-Type" ] ) :
@@ -409,8 +405,7 @@ static object GetRequestContentContent(
409405 else
410406 {
411407 // [payload] contains a value object of some sort.
412- return payloadNode ? . GetEx < object > ( ) ??
413- throw new HyperlambdaException ( $ "No [payload] value supplied to [{ input . Name } ]") ;
408+ return payloadNode ? . GetEx < object > ( ) ;
414409 }
415410 }
416411
@@ -422,7 +417,7 @@ async Task<object> GetRequestFileContentAsync(Node input)
422417 // If no [content] was given we check if caller supplied a [filename] argument.
423418 var filename = input . Children . FirstOrDefault ( x => x . Name == "filename" ) ? . GetEx < string > ( ) ;
424419 if ( filename == null )
425- throw new HyperlambdaException ( $ "No [payload] or [filename] argument supplied to [ { input . Name } ]" ) ;
420+ return "" ;
426421
427422 // Caller supplied a [filename] argument, hence using it as a stream content object.
428423 if ( await _fileService . ExistsAsync ( _rootResolver . AbsolutePath ( filename ) ) )
0 commit comments