File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/WebJobs.Script.WebHost/Controllers Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,12 @@ public async Task<IActionResult> Assign([FromBody] HostAssignmentRequest hostAss
41
41
if ( string . IsNullOrEmpty ( hostAssignmentContext . EncryptedContext ) &&
42
42
( hostAssignmentContext ? . AssignmentContext == null || hostAssignmentContext . AssignmentContext == null ) )
43
43
{
44
- return BadRequest ( "Assignment context and EncryptedContext is missing." ) ;
44
+ return BadRequest ( "Atleast one of Assignment context and EncryptedContext needs to be set." ) ;
45
+ }
46
+ if ( ! string . IsNullOrEmpty ( hostAssignmentContext . EncryptedContext ) &&
47
+ ! ( hostAssignmentContext ? . AssignmentContext == null || hostAssignmentContext . AssignmentContext == null ) )
48
+ {
49
+ return BadRequest ( "Only one of Assignment context and EncryptedContext needs to be set." ) ;
45
50
}
46
51
47
52
var debugMessage = ( hostAssignmentContext . EncryptedContext . Length > 0 ) ? "ContextLength is : " + hostAssignmentContext . EncryptedContext . Length : "Using unencrypted assignment context" ;
You can’t perform that action at this time.
0 commit comments