I have a new REST API tap that I am scaffolding fr...
# singer-tap-development
m
I have a new REST API tap that I am scaffolding from the SDK cookiecutter template. I’m getting an error
singer_sdk.exceptions.FatalAPIError: 404 Client Error: Not Found for path:
. The path in this error message is one I know to be correct - a cURL command against it gets the expected response. Is there an easy way to log out the full URL (including query parameters) so that I can better debug this?
1
ok, found the issue: this works in cURL:
Copy code
/transactions?startDate
This is what I’m setting the path to:
Copy code
/transactions
But this is what Meltano is using:
Copy code
/transactions/?startDate
and that 404s 😕 So now the question is, what’s the best way to strip out the trailing
/
character from the path?
This fixed it for me. Feels a little hacky, but it worked.
Copy code
def get_url(self, context: dict | None) -> str:
        return super().get_url(context).rstrip("/")
e
What did the
path
attribute of the stream looked like? If the SDK is adding a trailing slash that may be a bug.
m
I was actually setting the
path
to
""
in the stream class
👀 1
e
Oh, gotcha