Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: map resource_missing to ErrNotFound #28

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

titusjaka
Copy link
Contributor

Why?

Let's say, I'm requesting preferences of non-existing user. In this case I get the following response:

{
    "code": "resource_missing",
    "message": "The resource you requested does not exist",
    "status": 404,
    "type": "api_error"
}

I assume it means "the resource is not found" and should be mapped on ErrNotFound.
Unfortunately, at this moment it is not mapped on any error code at all. So, i've just added the mapping.

@tazhate
Copy link

tazhate commented Feb 21, 2024

Very annoying bug!
@cjbell @juanazam @adamantike please take a look

@cjbell cjbell merged commit 67c5882 into knocklabs:main Apr 30, 2024
@titusjaka titusjaka deleted the resource-missing branch April 30, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants