|
77 | 77 | {
|
78 | 78 | "requestId": "d2476e5b-b2bc-6a70-2647-3991f68ab415",
|
79 | 79 | "status": {
|
| 80 | + "message": "Some error", |
80 | 81 | "code": 401,
|
81 | 82 | "attributes": {}
|
82 | 83 | },
|
@@ -233,67 +234,67 @@ func TestMarshalRespone(t *testing.T) {
|
233 | 234 | })
|
234 | 235 |
|
235 | 236 | Convey("And resp401.Data should be 'UNAUTHORIZED'", func() {
|
236 |
| - So(resp401.Data, ShouldResemble, gremerror.NewNetworkError(401, "UNAUTHORIZED")) |
| 237 | + So(resp401.Data, ShouldResemble, gremerror.NewNetworkError(401, "UNAUTHORIZED", "Some error")) |
237 | 238 | })
|
238 | 239 |
|
239 | 240 | Convey("Then the status code should be 407", func() {
|
240 | 241 | So(resp407.Code, ShouldEqual, 407)
|
241 | 242 | })
|
242 | 243 |
|
243 | 244 | Convey("And resp407.Data should be 'AUTHENTICATE'", func() {
|
244 |
| - So(resp407.Data, ShouldResemble, gremerror.NewNetworkError(407, "AUTHENTICATION REQUIRED")) |
| 245 | + So(resp407.Data, ShouldResemble, gremerror.NewNetworkError(407, "AUTHENTICATION REQUIRED", "")) |
245 | 246 | })
|
246 | 247 |
|
247 | 248 | Convey("Then the status code should be 498", func() {
|
248 | 249 | So(resp498.Code, ShouldEqual, 498)
|
249 | 250 | })
|
250 | 251 |
|
251 | 252 | Convey("And resp498.Data should be 'MALFORMED REQUEST", func() {
|
252 |
| - So(resp498.Data, ShouldResemble, gremerror.NewNetworkError(498, "MALFORMED REQUEST")) |
| 253 | + So(resp498.Data, ShouldResemble, gremerror.NewNetworkError(498, "MALFORMED REQUEST", "")) |
253 | 254 | })
|
254 | 255 |
|
255 | 256 | Convey("Then the status code should be 499", func() {
|
256 | 257 | So(resp499.Code, ShouldEqual, 499)
|
257 | 258 | })
|
258 | 259 |
|
259 | 260 | Convey("And resp499.Data should be 'INVALID REQUEST ARGUMENTS'", func() {
|
260 |
| - So(resp499.Data, ShouldResemble, gremerror.NewNetworkError(499, "INVALID REQUEST ARGUMENTS")) |
| 261 | + So(resp499.Data, ShouldResemble, gremerror.NewNetworkError(499, "INVALID REQUEST ARGUMENTS", "")) |
261 | 262 | })
|
262 | 263 |
|
263 | 264 | Convey("Then the status code should be 500", func() {
|
264 | 265 | So(resp500.Code, ShouldEqual, 500)
|
265 | 266 | })
|
266 | 267 |
|
267 | 268 | Convey("And resp500.Data should be 'SERVER ERROR'", func() {
|
268 |
| - So(resp500.Data, ShouldResemble, gremerror.NewNetworkError(500, "INTERNAL SERVER ERROR")) |
| 269 | + So(resp500.Data, ShouldResemble, gremerror.NewNetworkError(500, "INTERNAL SERVER ERROR", "")) |
269 | 270 | })
|
270 | 271 |
|
271 | 272 | Convey("Then the status code should be 597", func() {
|
272 | 273 | So(resp597.Code, ShouldEqual, 597)
|
273 | 274 | })
|
274 | 275 |
|
275 | 276 | Convey("And resp597.Data should be 'SCRIPT EVALUATION ERROR'", func() {
|
276 |
| - So(resp597.Data, ShouldResemble, gremerror.NewNetworkError(597, "SCRIPT EVALUATION ERROR")) |
| 277 | + So(resp597.Data, ShouldResemble, gremerror.NewNetworkError(597, "SCRIPT EVALUATION ERROR", "")) |
277 | 278 | })
|
278 | 279 |
|
279 | 280 | Convey("Then the status code should be 598", func() {
|
280 | 281 | So(resp598.Code, ShouldEqual, 598)
|
281 | 282 | })
|
282 | 283 |
|
283 | 284 | Convey("And resp598.Data should be 'SERVER TIMEOUT'", func() {
|
284 |
| - So(resp598.Data, ShouldResemble, gremerror.NewNetworkError(598, "SERVER TIMEOUT")) |
| 285 | + So(resp598.Data, ShouldResemble, gremerror.NewNetworkError(598, "SERVER TIMEOUT", "")) |
285 | 286 | })
|
286 | 287 |
|
287 | 288 | Convey("Then the status code should be 599", func() {
|
288 | 289 | So(resp599.Code, ShouldEqual, 599)
|
289 | 290 | })
|
290 | 291 |
|
291 | 292 | Convey("And resp599.Data should be 'SERVER SERIALIZATION ERROR'", func() {
|
292 |
| - So(resp599.Data, ShouldResemble, gremerror.NewNetworkError(599, "SERIALIZATION ERROR")) |
| 293 | + So(resp599.Data, ShouldResemble, gremerror.NewNetworkError(599, "SERIALIZATION ERROR", "")) |
293 | 294 | })
|
294 | 295 |
|
295 | 296 | Convey("Then respDefault.Data should be 'UNKNOWN ERROR'", func() {
|
296 |
| - So(respDefault.Data, ShouldResemble, gremerror.NewNetworkError(403, "UNKNOWN ERROR")) |
| 297 | + So(respDefault.Data, ShouldResemble, gremerror.NewNetworkError(403, "UNKNOWN ERROR", "")) |
297 | 298 | })
|
298 | 299 | })
|
299 | 300 | })
|
|
0 commit comments