Commit c865327
committed
fix(diagnostics): a passing check should not report an HTTP status
The self-test showed "PASS · TSP+DIDComm mediator accepts this wallet's
origin — answered (HTTP 405)". The first person to read it asked what was
broken. Nothing was.
The status was named on purpose, reasoning that seeing the number would
make it obvious a 4xx is expected and not the thing being tested. It did
the opposite. A green PASS next to a 405 reads as a contradiction, and
the reader has to already understand CORS probing to resolve it — which
is precisely the knowledge this panel exists to not require.
`checkCorsReachable` sends a plain GET against the same endpoint that
would fail, so a POST-only auth route answers 405 and a REST base with no
handler at its bare path answers 404. Both are complete passes: ANY status
proves the origin was allowed, because a CORS refusal has no status to
read at all. The number answers a question nobody asked, in a place where
an unexplained number reads as a fault.
So `checkCorsReachable` no longer returns it — a field whose only consumer
was that misleading line is not worth keeping for a future caller who
would be wrong to use it. Failures are untouched: they carry their detail
and a stable `code`, which is where the diagnosis belongs.
The REST row also gains the "with this extension's origin" clause it was
missing, so both rows now say what was actually proven rather than what
was received.
Signed-off-by: Glenn Gore <glenn.g@affinidi.com>1 parent 2fd8b16 commit c865327
1 file changed
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
728 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
729 | 732 | | |
730 | 733 | | |
731 | 734 | | |
732 | 735 | | |
733 | | - | |
| 736 | + | |
734 | 737 | | |
735 | | - | |
736 | | - | |
| 738 | + | |
| 739 | + | |
737 | 740 | | |
738 | 741 | | |
739 | 742 | | |
| |||
777 | 780 | | |
778 | 781 | | |
779 | 782 | | |
780 | | - | |
781 | | - | |
782 | | - | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
783 | 795 | | |
784 | 796 | | |
785 | 797 | | |
| |||
910 | 922 | | |
911 | 923 | | |
912 | 924 | | |
913 | | - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
914 | 929 | | |
915 | 930 | | |
916 | 931 | | |
| |||
0 commit comments