Skip to content

Conversation

deanhuynh
Copy link
Contributor

@deanhuynh deanhuynh commented Jan 6, 2025

Adds ID to error messages for easier debugging.

Example:

│ Error: Unable to update Function (ID: ifnd_abc123)
│ 
│   with segment_function.test1,
│   on main.tf line 551, in resource "segment_function" "test1":
│  551: resource "segment_function" "test1" {
│ 
│ 500 Internal Server Error
│ {
│   "errors": [
│     {
│       "type": "internal",
│       "message": "function invocation failed: Unexpected identifier"
│     }
│   ]
│ }
│ Error: Unable to read Function (ID: sfnc_abc123)
│ 
│   with segment_function.test,
│   on main.tf line 381, in resource "segment_function" "test":
│  381: resource "segment_function" "test" {
│ 
│ 404 Not Found
│ {
│   "errors": [
│     {
│       "type": "not-found",
│       "message": "function not found"
│     }
│   ]
│ }

@deanhuynh deanhuynh requested a review from a team as a code owner January 6, 2025 22:43
@deanhuynh deanhuynh merged commit 51e33d7 into main Jan 6, 2025
17 checks passed
@deanhuynh deanhuynh deleted the APICS-2870/improve-error-messages branch January 6, 2025 23:16
@deanhuynh deanhuynh mentioned this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants