contentful-management
Advanced tools
Comparing version 0.6.0 to 0.7.0
# Changelog | ||
## v0.7.0 | ||
- Improve missing property errors | ||
## v0.5.0 - 2015-10-26 | ||
@@ -4,0 +7,0 @@ - Expose full error object on the APIError instances |
@@ -11,2 +11,3 @@ 'use strict'; | ||
var APIError = require('./lib/api-error'); | ||
var PropError = require('./lib/prop-error'); | ||
var createBackoff = require('./lib/backoff'); | ||
@@ -23,3 +24,3 @@ var rateLimit = require('./lib/rate-limit'); | ||
if (!_.hasPath(identifiable, ['sys', 'id'])) { | ||
throw new TypeError('Expected resource to have an ID in sys.id'); | ||
throw new PropError('Expected resource to have an ID in sys.id', identifiable); | ||
} | ||
@@ -33,3 +34,3 @@ return _.getPath(identifiable, ['sys', 'id']); | ||
if (!_.hasPath(resource, ['sys', 'version'])) { | ||
throw new TypeError('Expected resource to have a version in sys.version'); | ||
throw new PropError('Expected resource to have a version in sys.version', resource); | ||
} | ||
@@ -651,3 +652,3 @@ return _.getPath(resource, ['sys', 'version']); | ||
if (!_.exists(object[property])) | ||
throw new TypeError('Expected property ' + property); | ||
throw new PropError('Expected property ' + property, object); | ||
} | ||
@@ -654,0 +655,0 @@ |
{ | ||
"name": "contentful-management", | ||
"description": "Client for Contentful's Content Management API", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"homepage": "https://www.contentful.com/developers/documentation/content-management-api/", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
447934
29
5919
6
9
95
3