Commit 63862cd
authored
Set RequestMessage in matched StubbedResponse
When running AcceptanceTests for error scenarios using Refit, it throws null reference exception. This is caused by refit trying to access response.RequestMessage.Method while response.RequestMessage is null.
This change resolves that issue by setting the original request as response.RequestMessage. It will also help if any tested code is accessing response.RequestMessage.
The refit method that throws null reference exception https://github.com/reactiveui/refit/blob/569108a65079d364647f06437f977df8145fc578/Refit/RefitSettings.cs#L2331 parent 8cd5b56 commit 63862cd
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
0 commit comments