On Failure , the code returns the below exceptionProcessHttpClientResponseException: Error making HttpClient request in queryable: [404] Not Found

Typescript Example:

Typescript is the superset of JavaScript and this PnP JS library is developed using the typescript specification. For developing the SharePoint Framework web parts and make the client side development easier, we can vote for typescript. The below is the typescript example for getting the SharePoint List based on relative url.