Commit 26ca2a5
🩹 [Patch]: Update Assert-GitHubContext error message to include context type info (#469)
This pull request introduces improvements to error handling and
messaging in PowerShell scripts related to GitHub context validation and
GraphQL query execution. The changes enhance clarity and provide more
detailed error information for debugging purposes.
- Fixes #468
### Improvements to error handling
* Enhanced error message formatting in `Assert-GitHubContext.ps1`:
Updated the error message to include the context name, type, and
required types in a more readable format. This improves clarity when the
context authentication type does not match the required types for a
command.
* Detailed GraphQL error messages in `Invoke-GitHubGraphQLQuery.ps1`:
Added a clear header ("GraphQL errors occurred") and moved the full
error details to the beginning of the error message. This change makes
the error output more structured and easier to interpret.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: MariusStorhaug <[email protected]>
Co-authored-by: Marius Storhaug <[email protected]>1 parent f2b89e4 commit 26ca2a5
File tree
2 files changed
+10
-5
lines changed- src/functions
- private/Auth/Context
- public/API
2 files changed
+10
-5
lines changedLines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
0 commit comments