Skip to content

Commit 3c2dcdf

Browse files
committed
fix: get-subscription - various issues described below
* Controller needed @transactional. This did not show in the integration tests cos they already had @transactional wrapper on the @test which was a BAD IDEA * Database event_types needed to be an array i.e. varchar(128)p[]. Puzzled why this did not show on the integrations tests * Entity needs @Enumerated to ensure its saved as string. Might change this to database enum to avoid this * Lack of exception handler meant some logging was not showing. We not have a global handler to log everything and rethrow * Added the missing api-test which would have exhibited the error
1 parent 86ea10e commit 3c2dcdf

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/debugging.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Debugging
2+
3+
The command below will post to create a subscription and return a clientSubscriptionId which can then be queried with GET
4+
```
5+
export PORT=4550
6+
export HOST="localhost:$PORT"
7+
curl -XPOST http://$HOST/client-subscriptions \
8+
-H "Content-Type: application/json" \
9+
-d '{"eventTypes":["PCR","CUSTODIAL_RESULT"],"notificationEndpoint":{"webhookUrl":"https://my-callback-url"}}'
10+
```
11+
12+
... Creates and returns a subscription with a clientSubscriptionId
13+
ie.
14+
```
15+
{"clientSubscriptionId":"585fde62-44df-4b3d-ac38-5e1f4d7669e3",
16+
"createdAt":"2025-12-19T15:16:38.456506Z",
17+
"eventTypes":["CUSTODIAL_RESULT","PCR"],
18+
"notificationEndpoint":{"webhookUrl":"https://my-callback-url"},"updatedAt":"2025-12-19T15:16:38.456772Z"}
19+
```
20+
21+
Query
22+
```
23+
export SUBSCRIPTION_ID="585fde62-44df-4b3d-ac38-5e1f4d7669e3"
24+
curl http://$HOST/client-subscriptions/$SUBSCRIPTION_ID
25+
```

0 commit comments

Comments
 (0)