Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle exception on generating the url #550

Merged
merged 5 commits into from
Feb 22, 2024
Merged

Conversation

yobottehg
Copy link
Contributor

This pull request is for: (mark with an "x")

  • examples/*
  • modules/next
  • packages/next-drupal
  • starters/basic-starter
  • starters/graphql-starter
  • Other

GitHub Issue: #549

  • I need help adding tests. (mark with an "x")

Unsure if this is the wanted approach to fix the issue. If yes then i can add a test for this.

Describe your changes

Entities with canonical urls can not always have an URI (e.g when storage is disabled). As far as i know there is not clear way in Drupal to catch this so i just wrapped the url generation with try catch and handle the exception.

@vercel
Copy link

vercel bot commented Oct 11, 2023

@yobottehg is attempting to deploy a commit to the Chapter Three Team on Vercel.

A member of the Team first needs to authorize it.

@JohnAlbin
Copy link
Collaborator

@yobottehg This PR is failing Drupal coding standards:

FILE: .../work/next-drupal/next-drupal/modules/next/src/Event/EntityActionEvent.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 80 | ERROR | [x] Expected newline after closing brace

Otherwise, this change looks good to be committed.

@yobottehg
Copy link
Contributor Author

@JohnAlbin Thank you for the ping. Feedback addressed!

@JohnAlbin JohnAlbin merged commit bdd289f into chapter-three:main Feb 22, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants