File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed 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" ;
2
2
import { Serializer } from "../serializers" ;
3
3
import { ErrorHandler , NotFoundError } from "../errors" ;
4
4
import { LinkExtractor , Link } from "../links" ;
@@ -188,7 +188,7 @@ export class Endpoint {
188
188
const links = this . getLinks ( rel ) ;
189
189
190
190
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 ) ;
192
192
193
193
return links [ 0 ] . uri ;
194
194
}
@@ -214,7 +214,7 @@ export class Endpoint {
214
214
?? this . defaultLinkTemplates . get ( rel ) ;
215
215
216
216
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 ) ;
218
218
219
219
return template ;
220
220
}
You can’t perform that action at this time.
0 commit comments