npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

akamai-error-lookup

v1.2.13

Published

Retrieves diagnostic details of Akamai error reference numbers via Akamai's API

Downloads

46

Readme

akamai-error-lookup

Version node-current Codacy Badge GitHub issues Known Vulnerabilities Libraries.io dependency status for latest release Downloads Licence

Quick Start

  • Install globally using npm install -g akamai-error-lookup
  • Configure your Akamai API credentials in auth.edgerc
  • Run hashref [errorReference]

Output Example

Overview

A command line utility to lookup Akamai error reference numbers (e.g. Reference #18.2d351ab8.1557333295.a4e16ab).

If you work on a website hosted behind Akamai's CDN you will, on occasion, see an Akamai Reference # error number. These occur when Akamai catches an error, as opposed to the origin serving an error, such as a DNS resolution failure or an origin connection error.

In these scenarios Akamai reports an error reference number:

error - Service Unavailable - DNS failure

Using hashref you can lookup the details of the #Ref error number to diagnose the root cause of the error:

hashref 11.2e373217.1558103133.1dedf6b

usage example


Installation

npm install -g akamai-error-lookup

Configuration

You'll need to create an auth.edgerc file and configure it with your Akamai API credentials as described here.

You can save auth.edgerc in either the current directory or in the home directory (node -p require('os').homedir()).

Using the home directory means you can install the package globally and call hashref from any location.

If the auth.edgerc file is not found you'll receive the following error message:

auth file not found


Usage

hashref [errorReference] [options]


Options

--decode <true|false>            Enable or disable decoding of URLs and user-agent [true]
--no-color                       Switches off colour output
--version                        Display version number
--help                           Display this help

decode

By default all output will be decoded, so that fields such as user-agent and URL are more readable. Use --decode false to switch this off.

no-color

If your terminal has problems rendering the colour output then you can switch it off by using --no-color.

version

Prints out akamai-error-lookup's version number.

help

Displays the help screen.


Verbose output

The default terminal output contains a selective subset of the more salient fields returned by Akamai's API.

The full json response is automatically written to the operating system's default directory for temporary files (node -p require('os').tmpdir()). The location is displayed as part of the terminal output:

Writing full response to [C:\Users\foo\AppData\Local\Temp\11.2e373217.1558514903.f6c71e.json]

Note: On Linux systems this will be /tmp rather than /var/tmp which means these files will not persist a system reboot. If you want to retain them, copy them elsewhere.

Debugging

akamai-error-lookup uses the npm package debug. If you set the environment variable debug to hashref you'll see full debug output.

Windows

set debug=hashref
hashref [errorReference]

Linux

DEBUG=hashref hashref [errorReference]

Powershell

$env:debug="hashref"
node akamai-error-lookup [errorReference]

Where is the Change Log

The Change Log as been moved to its own file, CHANGELOG.md, and can be found here