Exception: AtlasRb::NotFoundError

Inherits:
ResourceError show all
Defined in:
lib/atlas_rb/errors.rb

Overview

Raised when a write binding (create, update, metadata, parent, rollback, and their siblings) targets a resource Atlas answers 404 for — a mistyped or foreign NOID, or one re-parented away.

A 404 on the read path is not this: Resource.find and its typed overrides return a clean nil, because "there is nothing there" answers a read. It cannot answer a write — the caller asked for a change that did not happen — so the write path raises instead of coercing to nil. Atlas renders the refusal as head :not_found with an empty body, which is what made the old blind JSON.parse surface it as JSON::ParserError: unexpected end of input: a message naming neither the resource nor the verb.

rescue AtlasRb::NotFoundError => e
report.rows.failed(row, "no such object in this repository")

A subclass of ResourceError, so it carries the same status / body and a caller that only wants "the write failed" can rescue the parent.

Instance Attribute Summary

Attributes inherited from ResourceError

#body, #response, #status

Method Summary

Methods inherited from ResourceError

#initialize

Constructor Details

This class inherits a constructor from AtlasRb::ResourceError