I have a .net 5.0 Blazor serverside web app that calls a .net 5 Api via Refit. When I run the app locally it works fine, but after i deploy the API and the Web app to Openshift the app loads and does the initial get fine, but if i try to update one of the records I get an error
Error: Refit.ApiException: Response status code does not indicate success: 500 (Internal Server Error).
at Refit.RequestBuilderImplementation.<>c__DisplayClass14_0`2.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext() in /_/Refit/RequestBuilderImplementation.cs:line 270
--- End of stack trace from previous location where exception was thrown ---
The setup of the refit is as follows
[Patch("/MyEntity/")]
Task<bool> PatchMyEntityAsync([Body] MyEntity entity);
[Patch("/MyEntity/")]
Task<bool> PostMyEntityAsync([Body] MyEntity entity);
[Get("/MyEntity/{id}")]
Task<MyEntity> GetByIdAsync(int id);
[Get("/MyEntity/")]
Task<IEnumerable< MyEntity >> GetMyEntitiesAsync();
This all works locally but not when deployed. I am using refit version 6.0.94 When its deployed the GetMyEntitiesAsync() and GetById works but NOT the Post or Patch, locally all 4 works. When deployed i get the 500 exception. The Api is not being hit at all so refit seems to be throwing the exception
I have a list which loads fine via the API, when i click edit GetById loads the edit page fine, the strange thing is if I click the Save or even the cancel button which simply fires
NavigationManager.NavigateTo("/myEntity_list")
When the list page open again I also get the 500 error as above!
The Hosted version of the App and API are hosted on Linux Docker container. Locally where it works is Windows 10.