Skip to content

Commit

Permalink
Fix message formatting, re #10250
Browse files Browse the repository at this point in the history
  • Loading branch information
chiatt committed Nov 29, 2023
1 parent 041542f commit 57998a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion arches/app/media/js/views/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ define([
this.viewModel.alert(false);
},
error: function(response, status, error) {
const alert = new AlertViewModel('ep-alert-red', arches.requestFailed.title, response.responseJSON?.message);
if(this.updateRequest.statusText !== 'abort'){
this.viewModel.alert(new AlertViewModel('ep-alert-red', arches.requestFailed.title, response.responseText));
this.viewModel.alert(alert);
}
},
complete: function(request, status) {
Expand Down
2 changes: 1 addition & 1 deletion arches/app/views/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def search_results(request, returnDsl=False):
append_instance_permission_filter_dsl(request, search_results_object)
except Exception as err:
logger.exception(err)
return JSONErrorResponse(message=err)
return JSONErrorResponse(message=str(err))

dsl = search_results_object.pop("query", None)
if returnDsl:
Expand Down

0 comments on commit 57998a4

Please sign in to comment.