Commit 6ca15ec
authored
Return JSON body from syncIdentity Post (#634)
Looks like:
1. API returns 201 with content application/json, but doesn't return any
content
2. lambda.ts injects a space because streaming responses require a body
to be present
3. When the website syncs the users identity, it ends up trying to parse
a space and returns Syntax Error: Unexpected end of JSON input
4. Next checkout attempt works because sync succeeded server-side
So:
- Give it something to parse
Tested locally by running website against change deployed to
core.aws.qa.acmuiuc.org.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* The sync identity endpoint now returns a JSON body { "success": true }
with HTTP 201 Created on success (previously returned an empty body).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 45cf2c2 commit 6ca15ec
2 files changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
0 commit comments