Skip to content

Improve error logging in Lambda filesystem creation - #5

Merged
beatgeek merged 2 commits into
filesystem-supportfrom
copilot/sub-pr-3
Feb 2, 2026
Merged

Improve error logging in Lambda filesystem creation#5
beatgeek merged 2 commits into
filesystem-supportfrom
copilot/sub-pr-3

Conversation

Copilot AI commented Feb 2, 2026

Copy link
Copy Markdown

Summary

  • Modified filesystem creation error handling to log full API response only when error extraction fails

Changes

  • Moved full response logging inside the error extraction fallback branch
  • Added explicit message when error extraction fails: "could not extract error message. Full response:"
  • When error message is successfully extracted from .error, .errors[0].message, or .message, only that message is displayed

Before:

if [ -n "$err_msg" ] && [ "$err_msg" != "null" ]; then
  echo "Filesystem creation failed: $err_msg"
else
  echo "Filesystem creation failed; raw response:"
fi
echo "$fs_resp" | jq . || echo "$fs_resp"  # Always logged

After:

if [ -n "$err_msg" ] && [ "$err_msg" != "null" ]; then
  echo "Filesystem creation failed: $err_msg"
else
  echo "Filesystem creation failed; could not extract error message. Full response:"
  echo "$fs_resp" | jq . || echo "$fs_resp"  # Only logged when extraction fails
fi

Testing

  • Not run (reason: workflow YAML change only; validated logic with shell script testing all error extraction paths)

Review focus

  • Error handling logic in "Create or select filesystem" step (lines 100-106)

Rollout / Notes

  • No runtime impact; improves debugging for unexpected Lambda API error formats

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: beatgeek <2343225+beatgeek@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Lambda filesystem support and teardown workflow PR Improve error logging in Lambda filesystem creation Feb 2, 2026
Copilot AI requested a review from beatgeek February 2, 2026 17:26
@beatgeek
beatgeek marked this pull request as ready for review February 2, 2026 18:41
@beatgeek
beatgeek merged commit 9397992 into filesystem-support Feb 2, 2026
3 checks passed
@beatgeek
beatgeek deleted the copilot/sub-pr-3 branch February 2, 2026 18:41
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.

2 participants