mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #185 from overleaf/jpa-doc-id-in-error-context
[misc] add/bring back doc_id in error context
This commit is contained in:
commit
849a1cf416
1 changed files with 4 additions and 2 deletions
|
@ -28,7 +28,7 @@ let Router
|
|||
module.exports = Router = {
|
||||
_handleError(callback, error, client, method, attrs) {
|
||||
attrs = attrs || {}
|
||||
for (const key of ['project_id', 'doc_id', 'user_id']) {
|
||||
for (const key of ['project_id', 'user_id']) {
|
||||
attrs[key] = client.ol_context[key]
|
||||
}
|
||||
attrs.client_id = client.id
|
||||
|
@ -275,7 +275,9 @@ module.exports = Router = {
|
|||
|
||||
WebsocketController.leaveDoc(client, doc_id, function (err, ...args) {
|
||||
if (err) {
|
||||
Router._handleError(callback, err, client, 'leaveDoc')
|
||||
Router._handleError(callback, err, client, 'leaveDoc', {
|
||||
doc_id
|
||||
})
|
||||
} else {
|
||||
callback(null, ...args)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue