Commit b80c069
fix: improve Vercel domain 'forbidden' error message and add schema fields (calcom#25520)
* fix: improve Vercel domain 'forbidden' error message
The 'forbidden' error code from Vercel is a generic permission denial,
not specifically 'domain owned by another team'. It can occur for various
reasons: wrong teamId, token lacking project access, account-level
restrictions, or domain ownership by another team.
Updated the error message to be more accurate and changed the HTTP status
code from 400 to 403 to better reflect the permission error nature.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* fix: add message and invalidToken fields to Vercel error response schema
This allows better logging of Vercel API error responses, especially when
tokens become invalid. The new fields help with debugging permission issues.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* fix: revert status code to 400 for Vercel forbidden errors
Keep the status code at 400 to avoid potential downstream side effects
while still using the improved error message and schema fields.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* fix: use .nullish() instead of .optional() for message and invalidToken fields
.nullish() handles both null and undefined, which is safer for API responses.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 44291be commit b80c069
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
78 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
79 | 86 | | |
80 | | - | |
| 87 | + | |
| 88 | + | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| |||
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
120 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
126 | | - | |
| 139 | + | |
127 | 140 | | |
128 | | - | |
| 141 | + | |
| 142 | + | |
129 | 143 | | |
130 | 144 | | |
131 | 145 | | |
| |||
0 commit comments