Open
Description
We currently use get()
directly on optionals when accessing rows (though they technically should exist in most cases). For example:
final NamespaceRow namespaceRow = NamespaceDao.findNamespaceByName().get()
We should move towards safely accessing the row value returned and throw an exception when not present (where applicable):
import marquez.db.exceptions.RowNotFoundException;
.
.
final NamespaceRow namespaceRow =
NamespaceDao.findNamespaceByName()
.orElseThrow(() -> new RowNotFoundException())
The exception can be mapped to a 500
.
Metadata
Metadata
Assignees
Type
Projects
Status
No status