syncthing/lib/api
Jakob Borg 946170f3fc
gui, lib/ignore: Handle editing ignores with error (fixes #5425) (#6757)
This changes the error handling in loading ignores slightly:

- There is a new ParseError type that is returned as the error
  (somewhere in the chain) when the problem was not an I/O error loading
  the file, but some issue with the contents.

- If the file was read successfully but not parsed successfully we still
  return the lines read (in addition to nil patterns and a ParseError).

- In the API, if the error IsParseError then we return a successful
  HTTP response with the lines and the actual error included in the JSON
  object.

- In the GUI, as long as the HTTP call to load the ignores was
  successful we can edit the ignores. If there was an error we show this
  as a validation error on the dialog.

Also some cleanup on the Javascript side as it for some reason used
jQuery instead of Angular for this editor...
2020-06-18 11:04:00 +02:00
..
auto lib/assets: Allow assets to remain uncompressed (#6661) 2020-05-25 08:51:27 +02:00
testdata cmd/syncthing, lib/api: Separate api/gui into own package (ref #4085) (#5529) 2019-03-26 19:53:58 +00:00
.gitignore lib/api: Ignore that one file that always shows up in git status 2020-03-07 11:46:54 +01:00
api_auth_test.go lib/api: Refactor to run tests in parallel (#5998) 2019-09-05 12:35:51 +01:00
api_auth.go lib/api: Add LDAP search filters (fixes #5376) (#6488) 2020-04-04 11:33:43 +02:00
api_csrf.go lib/api: Refactor to run tests in parallel (#5998) 2019-09-05 12:35:51 +01:00
api_statics.go lib/assets: Allow assets to remain uncompressed (#6661) 2020-05-25 08:51:27 +02:00
api_test.go lib/assets: Allow assets to remain uncompressed (#6661) 2020-05-25 08:51:27 +02:00
api.go gui, lib/ignore: Handle editing ignores with error (fixes #5425) (#6757) 2020-06-18 11:04:00 +02:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
mocked_config_test.go lib/config, lib/model: Commit auto-accepted folders all at once (#6684) 2020-05-27 08:05:26 +02:00
mocked_connections_test.go lib/connections: Return exported intf from exported function (#5947) 2019-08-13 09:33:33 +02:00
mocked_discovery_test.go lib: Faster termination on exit (ref #6319) (#6329) 2020-02-13 14:43:00 +01:00
mocked_events_test.go cmd/syncthing, lib/api: Separate api/gui into own package (ref #4085) (#5529) 2019-03-26 19:53:58 +00:00
mocked_logger_test.go cmd/syncthing, lib/api: Separate api/gui into own package (ref #4085) (#5529) 2019-03-26 19:53:58 +00:00
mocked_model_test.go all: Transactionalize db.FileSet (fixes #5952) (#6239) 2020-01-21 18:23:08 +01:00
support_bundle.go cmd/syncthing, lib/api: Separate api/gui into own package (ref #4085) (#5529) 2019-03-26 19:53:58 +00:00