Skip to content

Conversation

Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Aug 23, 2024

Often we are already showing some sort of error on the scene itself, or the error is attached to a simple info-only situation

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

showDevError(
`${lstrings.fio_request_error_header}. ${error.json && error.json.fields && error.json.fields[0] ? JSON.stringify(error.json.fields[0].error) : ''}`
)
showError(error.json?.fields?.[0]?.error ?? '')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it this way:

const errorText = error.json?.fields?.[0]?.error ?? String(error)
showError(lstrings.fio_request_error_header + '. ' + errorText)

That way we still show something if JSON isn't present. Or, we could do this if we really don't want lstrings.fio_request_error_header:

showError(error.json?.fields?.[0]?.error ?? error)

Often we are already showing some sort of error on the scene itself, or the error is attached to a simple info-only situation
@Jon-edge Jon-edge enabled auto-merge August 27, 2024 22:35
@Jon-edge Jon-edge merged commit a3924a1 into develop Aug 27, 2024
@Jon-edge Jon-edge deleted the jon/dev-error-2 branch August 27, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants