Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return a 404 error when attempting to access a deleted Whitehall asset
Currently, accessing a soft deleted asset returns a 404. However, accessing a soft deleted Whitehall asset still attempts to proxy to S3, then returns the resulting XML and 404 proxied back from S3. This commit changes that behaviour so that Whitehall assets are not proxied and a 404 is served from Asset Manager. Note: the asset media controller uses `find` to get the records, which raises an exception if no records are found. Whitehall media controller uses `find_by` which does not raise an exception, therefore we have to raise our own exception and rescue as a 404 in the event of no records being returned.
- Loading branch information
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters