Skip to content

fix: fileUpload error casting does not conform to interface #486

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

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

4xposed
Copy link
Contributor

@4xposed 4xposed commented Sep 7, 2023

Trying to debug the issues face by the dev-foundations team on this PR: #478 (comment)

I noticed that the interface inapierrors.Error has different function signatures than the types returned by UploadDeployFile and UploadDeployFunction

since we do safe casting _, ok := .() this failed silently and went unnoticed.

In this changes I implement an interface that matches the signature of the errors returned by those two functions and defined the function we need to use (Code() int)

@4xposed 4xposed requested a review from a team as a code owner September 7, 2023 15:15
@netlify
Copy link

netlify bot commented Sep 7, 2023

Deploy Preview for open-api ready!

Name Link
🔨 Latest commit 1e7c0d3
🔍 Latest deploy log https://app.netlify.com/sites/open-api/deploys/64f9e92c31b3790008e1dd99
😎 Deploy Preview https://deploy-preview-486--open-api.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@JGAntunes JGAntunes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️

@4xposed 4xposed merged commit f95a00b into master Sep 7, 2023
@4xposed 4xposed deleted the fix_api_error_interface branch September 7, 2023 16:24
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.

2 participants