Netlify-cms: Editor friendly error messages

Created on 29 Aug 2018  路  10Comments  路  Source: netlify/netlify-cms

Is your feature request related to a problem? Please describe.
If a part of the CMS is not working for any reason you sometimes get an error message. These error messages can be rather intimidating to the not so tech savvy user.

Describe the solution you'd like
Humanize the error messages / alerts / notifications. Something like 'An error has occurred. Try again or contact your friendly developer :) To check what went wrong click here / open console'.

Describe alternatives you've considered
Show error messages based on user roles could be a nice feature. If we know you're a developer we can show the error immediately. If we know you're an editor we should try to be less intimidating.

Most helpful comment

List of errors, most of them abracadabra to non-devs. They describe the issue just fine, but only if you know what a bitbucket/repo/branch/... is

  • [x] Failed to load settings from /.netlify/identity
  • [ ] Failed to load entries: API_ERROR: Not Found
  • [x] The BitBucket backend does not support the Editorial Workflow.
  • [ ] The BitBucket backend needs a "repo" in the backend configuration.
  • [ ] Your BitBucker user account does not have access to this repo.
  • [ ] You don't have sufficient permissions to access Netlify CMS
  • [ ] Cannot list files, path ${path} is not a directory but a ${files.type}
  • [ ] content is not under editorial workflow'
  • [ ] Editorial workflow branch changed unexpectedly.'
  • [ ] Only CMS branches can be force updated, cannot force update ${branchName}
  • [ ] The GitHub backend needs a "repo" in the backend configuration.
  • [ ] Your GitHub user account does not have access to this repo.
  • [ ] ${contentType} is not a valid JSON Content-Type
  • [ ] ${expectingFormat} is not a supported response format.
  • [x] The GitLab backend does not support the Editorial Workflow.
  • [ ] The GitLab backend needs a "repo" in the backend configuration.
  • [ ] Your GitLab user account does not have access to this repo.
  • [ ] Failed to load config.yml (${response.status})
  • [ ] The current cursor does not support the pagination action "${action}".
  • [ ] Collection must have a field name that is a valid entry identifier
  • [ ] Cannot instantiate a Backend with no implementation
  • [ ] 'Errors ocurred while searching entries locally!', errors
  • [x] Not allowed to create new entries in this collection
  • [x] Not allowed to delete entries in this collection
  • [ ] No file found for ${entry.get('slug')} in ${collection.get('name')}
  • [ ] No backend defined in configuration
  • [ ] Backend not found: ${name}
  • [ ] 'Unrecognized front-matter format.'
  • [ ] 'The Algolia search integration needs the credentials (applicationID and apiKey) in the integration configuration.'
  • [ ] 'The AssetStore integration needs the getSignedFormURL in the integration configuration.'
  • [ ] The input slug must be a string.
  • [ ] options.replacement must be a string.
  • [ ] options.encoding must be "unicode" or "ascii".
  • [ ] The replacement character(s) (options.replacement) is itself unsafe.
  • [ ] The Private Upload option is only avaible for Asset Store Integration
  • [ ] ${contentType} is not a valid JSON Content-Type
  • [ ] Expected an ok response, but received an error status: ${res.status}.
  • [ ] ${format} is not a supported response format.
  • [ ] Object must be equivalent to a Map.

All 10 comments

List of errors, most of them abracadabra to non-devs. They describe the issue just fine, but only if you know what a bitbucket/repo/branch/... is

  • [x] Failed to load settings from /.netlify/identity
  • [ ] Failed to load entries: API_ERROR: Not Found
  • [x] The BitBucket backend does not support the Editorial Workflow.
  • [ ] The BitBucket backend needs a "repo" in the backend configuration.
  • [ ] Your BitBucker user account does not have access to this repo.
  • [ ] You don't have sufficient permissions to access Netlify CMS
  • [ ] Cannot list files, path ${path} is not a directory but a ${files.type}
  • [ ] content is not under editorial workflow'
  • [ ] Editorial workflow branch changed unexpectedly.'
  • [ ] Only CMS branches can be force updated, cannot force update ${branchName}
  • [ ] The GitHub backend needs a "repo" in the backend configuration.
  • [ ] Your GitHub user account does not have access to this repo.
  • [ ] ${contentType} is not a valid JSON Content-Type
  • [ ] ${expectingFormat} is not a supported response format.
  • [x] The GitLab backend does not support the Editorial Workflow.
  • [ ] The GitLab backend needs a "repo" in the backend configuration.
  • [ ] Your GitLab user account does not have access to this repo.
  • [ ] Failed to load config.yml (${response.status})
  • [ ] The current cursor does not support the pagination action "${action}".
  • [ ] Collection must have a field name that is a valid entry identifier
  • [ ] Cannot instantiate a Backend with no implementation
  • [ ] 'Errors ocurred while searching entries locally!', errors
  • [x] Not allowed to create new entries in this collection
  • [x] Not allowed to delete entries in this collection
  • [ ] No file found for ${entry.get('slug')} in ${collection.get('name')}
  • [ ] No backend defined in configuration
  • [ ] Backend not found: ${name}
  • [ ] 'Unrecognized front-matter format.'
  • [ ] 'The Algolia search integration needs the credentials (applicationID and apiKey) in the integration configuration.'
  • [ ] 'The AssetStore integration needs the getSignedFormURL in the integration configuration.'
  • [ ] The input slug must be a string.
  • [ ] options.replacement must be a string.
  • [ ] options.encoding must be "unicode" or "ascii".
  • [ ] The replacement character(s) (options.replacement) is itself unsafe.
  • [ ] The Private Upload option is only avaible for Asset Store Integration
  • [ ] ${contentType} is not a valid JSON Content-Type
  • [ ] Expected an ok response, but received an error status: ${res.status}.
  • [ ] ${format} is not a supported response format.
  • [ ] Object must be equivalent to a Map.

Disregard my previous comment, I didn't read your OP 馃檮

Agreed :)

Console errors might actually be nicer for developers than notifs -- they don't disappear.

@tomrutgers Would you mind giving me a few specific error changes from the list above? Or are you wanting to change them all to a generic notif?

I think console errors are a good idea as well. Instead of rewriting them all maybe there should be a couple of general notif cagetories (error, warning, etc) with error id's that refer you to the console. The error id would help you to find ways to fix the error. The console would have the errors from the list above.

In the community development meeting, @mittalyashu mentioned that it would also be nice to give an editor the option to email an error message to the person who handles the CMS config/development.

At a very basic level, you could add a mailto link that populates the subject and content with the error message. This could include a config.yml option where you could specify an address to pre-fill in the mailto link.

Another option suggested by @mittalyashu was to have a config option to trigger a webhook on error. I imagine that would require config fields for the webhook URL and a payload format with a template tag for where the error message would be included.

Adding Failed to load settings from /.netlify/identity and Failed to load entries: API_ERROR: Not Found to the top of the list. Both errors can be fixed by enabling the git gateway in the Netlify Identity settings, but neither mention the solution.

I want to suggest adding something like Enable git-gateway in the Netlify Identity settings. to both errors as a quick win.

SGTM, though I would spell it "Git Gateway" like the setting UI does.

Failed to load entry: API_ERROR: Not Found shows up the first time you load an empty collection list. This is by no means an error and imho shouldn't even show up as such.

EDIT: Note how this error is different from the one listed on OP's list entry vs entries

Agreed, this is similar to the 404's we get when checking to see if a file exists, we shouldn't be showing any signs of error in these cases.

Was this page helpful?
0 / 5 - 0 ratings