Include details on what's missing when a NotFound error is triggered
Makes debugging issues like #2939 easier
This commit is contained in:
parent
57ec454847
commit
86687b4148
@ -23,7 +23,12 @@ pub struct NotFoundError {
|
|||||||
|
|
||||||
impl NotFoundError {
|
impl NotFoundError {
|
||||||
pub fn message(&self, tr: &I18n) -> String {
|
pub fn message(&self, tr: &I18n) -> String {
|
||||||
tr.errors_inconsistent_db_state().into()
|
format!(
|
||||||
|
"{} No such {}: '{}'",
|
||||||
|
tr.errors_inconsistent_db_state(),
|
||||||
|
self.type_name,
|
||||||
|
self.identifier
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn context(&self) -> String {
|
pub fn context(&self) -> String {
|
||||||
|
Loading…
Reference in New Issue
Block a user