Skip to content

Commit

Permalink
Change missing input params to RequestNotValid (#4439)
Browse files Browse the repository at this point in the history
Throw bad request for missing/invalid Parameters resource on $reindex call

Refs AB#124925
  • Loading branch information
feordin authored Aug 23, 2024
1 parent c21e635 commit 76698e7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public override void OnActionExecuting(ActionExecutingContext context)
context.ActionArguments?.TryGetValue("inputParams", out inputResource);
if (inputResource == null)
{
throw new MissingMethodException("Controller method does not contain parameter named 'inputParams'");
throw new RequestNotValidException(Resources.MissingInputParams);
}

if (inputResource is not Parameters)
Expand Down
9 changes: 9 additions & 0 deletions src/Microsoft.Health.Fhir.Api/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/Microsoft.Health.Fhir.Api/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -423,4 +423,7 @@
<data name="NotAbleToCreateTheFinalResultsOfAnOperation" xml:space="preserve">
<value>Not able to create final result. Retry the operation.</value>
</data>
<data name="MissingInputParams" xml:space="preserve">
<value>inputParams not found, request body must be a valid Parameters resource.</value>
</data>
</root>

0 comments on commit 76698e7

Please sign in to comment.