From 2ac98e39a262f318974ad50e9e1068291b760dea Mon Sep 17 00:00:00 2001 From: Tom <20648924+moT01@users.noreply.github.com> Date: Sat, 5 Jun 2021 03:13:18 -0500 Subject: [PATCH] fix(curriculum): allow any response status for error response (#41906) * fix(curriculum): allow any response status for error response * Update curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/timestamp-microservice.md Co-authored-by: Oliver Eyton-Williams * Update curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/timestamp-microservice.md Co-authored-by: Oliver Eyton-Williams Co-authored-by: Oliver Eyton-Williams --- .../apis-and-microservices-projects/timestamp-microservice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/timestamp-microservice.md b/curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/timestamp-microservice.md index ad70f1d3b9..00cee8bcd6 100644 --- a/curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/timestamp-microservice.md +++ b/curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/timestamp-microservice.md @@ -107,7 +107,7 @@ If the input date string is invalid, the api returns an object having the struct assert.equal(data.error.toLowerCase(), 'invalid date'); }, (xhr) => { - throw new Error(xhr.responseText); + assert(xhr.responseJSON.error.toLowerCase() === 'invalid date'); } ); ```