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'); } ); ```