question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose EntityNotFound exception

See original GitHub issue

Issue type:

[ ] question [X] bug report [ ] feature request [ ] documentation issue

TypeORM version:

[X] latest

Steps to reproduce or a small repository showing the problem:

I need to check the instanceof the exception thrown:

if(exception instanceof EntityNotFound) {
// do something
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

29reactions
Kononnablecommented, Oct 27, 2018

It’s not exported from the global scope, but you should still be able to access it by:

import { EntityNotFoundError } from 'typeorm/error/EntityNotFoundError'
8reactions
jalooccommented, Oct 24, 2019

I still would love to see the error classes importable through the main package (that is not by a path inside a package). The typeorm/error/EntityNotFoundError path is not the documented way to import the error (there’s no documented way whatsoever), so it has to be considered internal implementation. And that means, it’s not subject to semver and therefore prone to unexpected changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exposed/EntityNotFoundException.kt at master - GitHub
Exposed /exposed-dao/src/main/kotlin/org/jetbrains/exposed/dao/exceptions/EntityNotFoundException.kt · Go to file T · Go to line L · Copy path · Copy permalink.
Read more >
spring boot javax.persistence.EntityNotFoundException in ...
EntityNotFoundException : Unable to find ne.cnss.pension.beneficiaire.Beneficiaire with id 57271 at org.hibernate.jpa.boot.internal.
Read more >
EntityNotFoundException for already deleted entity during ...
Issue. We have an application based on JSF 2, CDI, JPA/Hibernate, and we are porting it from EAP 6.0.1 to EAP 6.4.
Read more >
EntityNotFoundException in Hibernate - Baeldung
In this tutorial, we'll talk about the EntityNotFoundException from the javax.persistence package. We'll cover the cases when this exception ...
Read more >
EntityNotFoundException Class
The exception that is thrown on attempt to use entity that doesn't exist. ... The EntityNotFoundException type exposes the following members. Constructors. Name ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found