* fix: server side error handling * fix: push only unknown 500 errors to sentry * fix: use in-house onerror in favor of errorHandling middleware * fix: split error template into dev and prod envs * fix: check Error instance * fix: error routes in test env * fix: review comments * Remove koa-onerror Co-authored-by: Tom Moor <tom.moor@gmail.com>
83 lines
1.8 KiB
Plaintext
83 lines
1.8 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`#documents.create should error with invalid parentDocument 1`] = `
|
|
Object {
|
|
"error": "authorization_error",
|
|
"message": "Authorization error",
|
|
"ok": false,
|
|
"status": 403,
|
|
}
|
|
`;
|
|
|
|
exports[`#documents.delete should require authentication 1`] = `
|
|
Object {
|
|
"error": "authentication_required",
|
|
"message": "Authentication required",
|
|
"ok": false,
|
|
"status": 401,
|
|
}
|
|
`;
|
|
|
|
exports[`#documents.list should require authentication 1`] = `
|
|
Object {
|
|
"error": "authentication_required",
|
|
"message": "Authentication required",
|
|
"ok": false,
|
|
"status": 401,
|
|
}
|
|
`;
|
|
|
|
exports[`#documents.restore should require authentication 1`] = `
|
|
Object {
|
|
"error": "authentication_required",
|
|
"message": "Authentication required",
|
|
"ok": false,
|
|
"status": 401,
|
|
}
|
|
`;
|
|
|
|
exports[`#documents.search should require authentication 1`] = `
|
|
Object {
|
|
"error": "authentication_required",
|
|
"message": "Authentication error",
|
|
"ok": false,
|
|
"status": 401,
|
|
}
|
|
`;
|
|
|
|
exports[`#documents.update should fail if document lastRevision does not match 1`] = `
|
|
Object {
|
|
"error": "invalid_request",
|
|
"message": "Document has changed since last revision",
|
|
"ok": false,
|
|
"status": 400,
|
|
}
|
|
`;
|
|
|
|
exports[`#documents.update should require authentication 1`] = `
|
|
Object {
|
|
"error": "authentication_required",
|
|
"message": "Authentication required",
|
|
"ok": false,
|
|
"status": 401,
|
|
}
|
|
`;
|
|
|
|
exports[`#documents.update should require text while appending 1`] = `
|
|
Object {
|
|
"error": "validation_error",
|
|
"message": "ValidationError: text is required while appending",
|
|
"ok": false,
|
|
"status": 400,
|
|
}
|
|
`;
|
|
|
|
exports[`#documents.viewed should require authentication 1`] = `
|
|
Object {
|
|
"error": "authentication_required",
|
|
"message": "Authentication required",
|
|
"ok": false,
|
|
"status": 401,
|
|
}
|
|
`;
|