Commit d57b517
committed
Print HTTP errors on stderr in
Most API errors are present in the response body itself, which will be
sent to stdout normally, but if stdout is redirected somewhere (as it's
common with scripts), failed HTTP requests will likely sabotage the rest
of the script, but no useful info will be shown on stderr.
This makes it so all REST and GraphQL errors are always shown on stderr.
Additionally, this makes sure that the command exits with a nonzero
status on any GraphQL errors.api command1 parent 6254946 commit d57b517
2 files changed
+65
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
116 | 148 | | |
117 | | - | |
| 149 | + | |
118 | 150 | | |
119 | 151 | | |
120 | 152 | | |
121 | 153 | | |
122 | | - | |
| 154 | + | |
123 | 155 | | |
124 | 156 | | |
125 | 157 | | |
126 | 158 | | |
127 | 159 | | |
128 | | - | |
129 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
130 | 165 | | |
131 | 166 | | |
132 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
161 | 186 | | |
162 | 187 | | |
163 | 188 | | |
| |||
166 | 191 | | |
167 | 192 | | |
168 | 193 | | |
169 | | - | |
| 194 | + | |
170 | 195 | | |
171 | 196 | | |
172 | 197 | | |
| |||
0 commit comments