Class NotFoundError
public
Extends:
AdapterError
Defined in:
../packages/adapter/src/error.js:281
Module:
@ember-data/adapter/error
A NotFoundError
equates to a HTTP 404 Not Found
response status.
It is used by an adapter to signal that a request to the external API
was rejected because the resource could not be found on the API.
An example use case would be to detect if the user has entered a route for a specific model that does not exist. For example:
app/routes/post.js | |
1 2 3 4 5 6 |
import Route from ' /routing/route'; import { NotFoundError } from ' -data/adapter/error'; import { inject as service } from ' /service'; import { action } from ' /object'; export default class PostRoute extends Route { |