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

Issue-1164: REST Endpoints actually return a WP_Error if Apple News *is not* initialized #1182

Merged

Conversation

renatonascalves
Copy link

@renatonascalves renatonascalves commented Oct 11, 2024

Summary

Fixes #1164

This PR addresses the issue where REST endpoints do not return a WP_Error if Apple News is not initialized. It includes the necessary code adjustments and unit tests to ensure the expected behavior is achieved.

Description

Improvements have been made to the REST endpoints to ensure they properly return a WP_Error when Apple News is not initialized. The codebase has been updated accordingly.

See https://github.com/search?q=repo%3Aalleyinteractive%2Fapple-news%20%5CApple_News%3A%3Ahas_uninitialized_error()%3B&type=code

Please, add unit tests.

Use Case

If Apple News is not initialized with the minimum settings, the REST API needs to return an error.

@renatonascalves renatonascalves marked this pull request as ready for review October 11, 2024 22:46
Copy link

@manewc manewc left a comment

Choose a reason for hiding this comment

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

🐻‍❄️

@renatonascalves renatonascalves merged commit 9e4101c into develop Oct 14, 2024
11 checks passed
@renatonascalves renatonascalves deleted the feature/issue-1164/rest-endpoints-return-wp-error branch October 14, 2024 23:20
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.

REST Endpoints actually return a WP_Error if Apple News *is not* initialized
2 participants