@@ -76,6 +76,7 @@ describe("Error", () => {
7676 assert . deepEqual ( error . response , httpResponse ) ;
7777 assert . equal ( error . message , httpResponse . body . message ) ;
7878 assert . equal ( error . httpStatus , httpResponse . httpStatus ) ;
79+ assert . deepEqual ( error . metadata , { } ) ;
7980 assert . equal ( error . name , "Ideal Postcodes Error" ) ;
8081 } ) ;
8182
@@ -192,6 +193,33 @@ describe("Error", () => {
192193 } ) ;
193194 } ) ;
194195
196+ describe ( "IdpcBalanceDepletedError" , ( ) => {
197+ describe ( "instantiation" , ( ) => {
198+ idpcApiErrorSuite ( {
199+ httpResponse : toResponse ( errors . balanceDepleted ) ,
200+ ErrorKlass : IdpcRequestFailedError ,
201+ } ) ;
202+ } ) ;
203+ } ) ;
204+
205+ describe ( "IdpcLimitReachedError" , ( ) => {
206+ describe ( "instantiation" , ( ) => {
207+ idpcApiErrorSuite ( {
208+ httpResponse : toResponse ( errors . dailyIpRateLimitReached ) ,
209+ ErrorKlass : IdpcRequestFailedError ,
210+ } ) ;
211+ } ) ;
212+ } ) ;
213+
214+ describe ( "IdpcLimitReachedError" , ( ) => {
215+ describe ( "instantiation" , ( ) => {
216+ idpcApiErrorSuite ( {
217+ httpResponse : toResponse ( errors . dailyLimitReached ) ,
218+ ErrorKlass : IdpcRequestFailedError ,
219+ } ) ;
220+ } ) ;
221+ } ) ;
222+
195223 describe ( "IdpcServerError" , ( ) => {
196224 describe ( "instantiation" , ( ) => {
197225 const httpResponse = {
0 commit comments