File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { HttpMethod , HttpHeader , HttpClient } from "../http" ;
1+ import { HttpMethod , HttpHeader , HttpStatusCode , HttpClient } from "../http" ;
22import { Serializer } from "../serializers" ;
33import { ErrorHandler , NotFoundError } from "../errors" ;
44import { LinkExtractor , Link } from "../links" ;
@@ -188,7 +188,7 @@ export class Endpoint {
188188 const links = this . getLinks ( rel ) ;
189189
190190 if ( links . length === 0 )
191- throw new NotFoundError ( `No link with rel=${ rel } provided by endpoint ${ this . uri } .` , 0 ) ;
191+ throw new NotFoundError ( `No link with rel=${ rel } provided by endpoint ${ this . uri } .` , HttpStatusCode . NotFound ) ;
192192
193193 return links [ 0 ] . uri ;
194194 }
@@ -214,7 +214,7 @@ export class Endpoint {
214214 ?? this . defaultLinkTemplates . get ( rel ) ;
215215
216216 if ( ! template )
217- throw new NotFoundError ( `No link template with rel=${ rel } provided by endpoint ${ this . uri } .` , 0 ) ;
217+ throw new NotFoundError ( `No link template with rel=${ rel } provided by endpoint ${ this . uri } .` , HttpStatusCode . NotFound ) ;
218218
219219 return template ;
220220 }
You can’t perform that action at this time.
0 commit comments