Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

[BUG] GraphQL error extensions property undefined if long link is null #957

Open
Coteh opened this issue Jul 14, 2020 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Coteh
Copy link
Collaborator

Coteh commented Jul 14, 2020

Describe the bug
Browser complains about graphQLError.extensions property being undefined if a null long link is attempted to be converted to string by user short links section. This seems to be because the error response is assumed to contain the extensions field.

To Reproduce

  1. Change any short link's long link to null
  2. Set user-short-links-section feature to true in app/usecase/feature/static.go
  3. Reload frontend homepage

Expected behavior
An error for loading the offending long link should be displayed.

Screenshots
Screen Shot 2020-07-13 at 8 25 12 PM

Additional context
Although null long link is indeed an error, a more sensible error should be displayed to the screen if this happens. Additionally, either the extensions property should be defined within the response of this error from backend, or the frontend should check for existence of this property before retrieving the extension code.

@Coteh Coteh added the bug Something isn't working label Jul 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant