feat: return security errors in the SIP-40 format (#9796)

This commit is contained in:
Erik Ritter
2020-05-13 17:10:37 -07:00
committed by GitHub
parent cf30e16550
commit d02f2d1fa7
9 changed files with 123 additions and 21 deletions

View File

@@ -49,7 +49,7 @@ describe('getClientErrorObject()', () => {
errors: [
{
errorType: ErrorTypeEnum.GENERIC_DB_ENGINE_ERROR,
extra: { engine: 'presto' },
extra: { engine: 'presto', link: 'https://www.google.com' },
level: 'error',
message: 'presto error: test error',
},
@@ -60,6 +60,7 @@ describe('getClientErrorObject()', () => {
return getClientErrorObject(new Response(jsonErrorString)).then(
errorObj => {
expect(errorObj.error).toEqual(jsonError.errors[0].message);
expect(errorObj.link).toEqual(jsonError.errors[0].extra.link);
},
);
});