Browse Source

fix: parsing exception from traceback

version-14
Saqib Ansari 3 years ago
parent
commit
1bde3b48bd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      frappe/public/js/frappe/request.js

+ 2
- 2
frappe/public/js/frappe/request.js View File

@@ -301,8 +301,8 @@ frappe.request.call = function(opts) {
console.log(e);
}
if (data && data.exception) {
// frappe.exceptions.CustomError -> CustomError
var exception = data.exception.split('.').at(-1);
// frappe.exceptions.CustomError: (1024, ...) -> CustomError
var exception = data.exception.split('.').at(-1).split(':').at(0);
var exception_handler = exception_handlers[exception];
if (exception_handler) {
exception_handler(data);


Loading…
Cancel
Save