Professional Documents
Culture Documents
of you, but you don’t see it? You keep on banging your head on ten other probable
solutions. Somehow the most common sense and simplest solution fail to catch your
attention.
I found a few organizations that had published the APIs that send the response
needed by my product. So, I began testing these APIs to see if they could provide a
useful output for my product. These API providers also share the API documentation,
which contains the details of the input and output parameters of these APIs.
To run these API, I used POSTMAN — an API platform for building and using APIs.
I was testing an API that required an audio file as an input parameter. So, first,
I created the request command by referencing the API documentation. Then, I created
a variable “AudioFile” and pointed it to a specific file on my local drive.
I clicked the “send” button to call the API. I got an error in response — a 404 —
“Resource not found” error.
I started diagnosing this error. Here are the different solutions that I tried:
Incorrect values — One of the values of a request parameter must be base64 encoded.
I might be sending the incorrect value in that parameter. I searched online to find
code to convert a string to a base64 encoded value. I tried a few methods and
pasted the base64 encoded value into the API request, but the error persisted: 404
— “Resource not found”
Wrong parameter name — I observed that the documentation did not mention the
parameter’s name, which was passing the audio file name. Maybe I am using the wrong
parameter name. I tried a few other combinations of the parameter name. I got the
same error: 404 — “Resource not found”
Support — Finally, I connected with the chat support provided by the API provider.
This also did not help much, as the chat support specialist told me this was a
technical problem. Either I had to take a paid support plan, OR I could reach out
to the community for help related to this issue.
Open an issue — I opened the community support and searched the forum to find if
someone had faced a similar issue. I could not find an existing thread on the same
problem; hence I logged a new issue.
I had spent almost two hours trouble-shooting the API error. I had not moved an
inch in terms of resolving the API error. After trying many different solutions, I
still got the same error. For self-motivation, I took help from Einstein’s quote
“I have not failed; I have just found 10,000 ways that do not work.”
I got tired and frustrated of fretting about this persistent error. My stomach
started making sounds to remind me to take the lunch break. Suddenly, I noticed
that the file for the parameter “AudioFile” was not showing in the folder.
I remembered specifying the filename through the “Select a file” dialog box, which
meant that the file did exist when I provided the value to the “AudioFile”
parameter. Maybe I accidentally deleted that file. So, the persistent 404 —
“Resource not found” was the infamous “File not found” error.
GOSH, such a simple and obvious solution, and I had wasted my time checking other
complicated and incorrect solutions.
But I also did a retrospection on this incident. How can I overlook such a simple
and basic thing?
One of the reasons for this oversight was my agitated state of mind before I
started working on this task.
I was frustrated over a personal matter which spilled into my work life and wasted
my time.
I remembered the lines from Og Mandino’s book “The Greatest Salesman in the World”
“There is no room in the marketplace for my family, nor is there room in my home
for the market. Each I will divorce from the other, and thus will I remain wedded
to both. Separate must they remain, or my career will die. This is a paradox of the
ages.”
And today, I learned a hard lesson by not following this advice. Hopefully, I will
keep this learning with me now.