Fix server error messages

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1141773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45775 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
brianwilkerson@google.com 2015-05-13 20:05:45 +00:00
parent 4c687fafdf
commit e73c0efc45

View file

@ -594,14 +594,14 @@ class RequestDecoder extends JsonDecoder {
@override @override
dynamic mismatch(String jsonPath, String expected) { dynamic mismatch(String jsonPath, String expected) {
return new RequestFailure( return new RequestFailure(new Response.invalidParameter(
new Response.invalidParameter(_request, jsonPath, 'be $expected')); _request, jsonPath, 'Expected to be $expected'));
} }
@override @override
dynamic missingKey(String jsonPath, String key) { dynamic missingKey(String jsonPath, String key) {
return new RequestFailure(new Response.invalidParameter( return new RequestFailure(new Response.invalidParameter(
_request, jsonPath, 'contain key ${JSON.encode(key)}')); _request, jsonPath, 'Expected to contain key ${JSON.encode(key)}'));
} }
} }