Closed pheyvaer closed 8 years ago
currently the error for non-existing template is:
{
"exception": "eu.freme.common.exception.TemplateNotFoundException",
"path": "/e-link/documents",
"message": "Could not find resource with id='123'",
"error": "Not Found",
"status": 404,
"timestamp": 1445869852530
}
Whats your suggestion? What should be improved to make it more clear?
The message now talkes about a resource
but I assume it means a template?
yes, it means template, however, this exception comes from a "generic" class - see https://github.com/freme-project/FREMECommon/blob/master/src/main/java/eu/freme/common/persistence/dao/OwnedResourceDAO.java#L84
@jnehring can we do smth with this?
OK, it is not a big issue. As you said, the name of the exception already states the problem :)
Thanks for reporting @pheyvaer . I think the error message is ok and it is not easy to implement a specific error message in the generic class. So lets leave it like it is.
Clearer error when calling
documents
with a non-existing, though valid, template ID.Same for
templates/{tempalteid}
.