Skip to content

Commit

Permalink
85-pattern-error: change error message to be more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
635487 committed May 30, 2024
1 parent a65726a commit 70ff0e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sde_indexing_helper/static/js/candidate_url_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ function postDocumentTypePatterns(
error: function (xhr, status, error) {
var errorMessage = xhr.responseText;
if (errorMessage == '{"error":{"non_field_errors":["The fields collection, match_pattern must make a unique set."]},"status_code":400}') {
toastr.error("Pattern already exists");
toastr.success("Pattern already exists");
return;
}
toastr.error(errorMessage);
Expand Down Expand Up @@ -984,7 +984,7 @@ function postTitlePatterns(
error: function (xhr, status, error) {
var errorMessage = xhr.responseText;
if (errorMessage == '{"error":{"non_field_errors":["The fields collection, match_pattern must make a unique set."]},"status_code":400}') {
toastr.error("Pattern already exists");
toastr.success("Pattern already exists");
return;
}
toastr.error(errorMessage);
Expand Down

0 comments on commit 70ff0e5

Please sign in to comment.