The problem I was having is that I wasn’t receiving the full error object. To do that I changed the code to:
const { username, password, email } = this.state;
axios
.post(`${Config.apiUrl}/wp/v2/users/register`, {
username: username,
password: password,
email: email,
})
.catch(err => {
console.log({err})
});
Which then allowed me to figure out that the error message is contained in:
err.response.data.message
So now I’m all good.
Related Posts:
- How to: Make JWT-authenticated requests to the WordPress API
- How would I add custom tables/endpoints to the WP REST API?
- WP REST API create post authentication issue
- Why is my custom API endpoint not working?
- WordPress REST API validation
- How do I correctly setup an AJAX nonce for WordPress REST API?
- WordPress Rest API: How do we validate with our custom API key?
- Adding WordPress API Endpoint With Multiple Parameters
- Using the REST API (v2) javascript client on a private namespaced route
- authentication issue with rest api – rest_cannot_create
- Hiding API routes list
- Match REST API post output from custom endpoint
- How to change user avatar using REST API?
- rest api authentication
- Does accessing WordPress via REST API affect the site stats and analytics?
- x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response
- How to get around WP REST API per page limit without pagination?
- Build on same WordPress or different install?
- Testing custom API endpoint with class dependency
- How to properly add custom entities in Gutenberg
- Not all featured image sizes available in Rest API
- WP API ignores filter parameter
- 403 Forbidden with gutenberg
- WordPress doesn’t send a notification email when submitting a comment using REST API
- Using WordPress RESTapi to call a php file instead of post or page
- Detect if REST API is running
- WordPress REST API – Modify JSON before importing
- Using pre_get_posts, how to target the REST API, only?
- Save/update post_meta with Gutenberg from the panel
- Set featured image using URL with wp rest api
- How to block all REST API endpoint except which I wrote custom?
- Authentication with internal WP_REST_Request and rest_do_request()
- pagination in WP rest api
- Can the new REST API now make WP into it’s own push notification server?
- Confused about AngularJS and WordPress
- Post API tax_relation field doesn’t work
- Cannot DIsplay a Snackbar Notice on Button Click – Notice is undefined
- How to post an unserialized array via wordpress rest API as meta data
- Use the backbone.js client to save custom post type meta
- Override WordPress POST REST API
- Custom Post Type and Custom REST API Endpoint result in Gutenberg editor not working
- rest_sanitize_value_from_schema doesn’t sanitize string
- Erratic OAuth 1.0 Signature Mismatch Errors
- WordPress Rest API custom endpoint for RSS feed
- How to add a custom REST field to limit data when fetching?
- Get subscribers via REST API and send post notification
- WordPress JSON data to and from database to be shown on rest point
- “No Access-Control-Allow-Origin header is present” even though it is in the entry file
- REST API authentication for a plugin
- rest api request including meta_query filter
- Rest API basic auth not working
- How to get featured image in WP rest api
- Filter DELETE REST API calls
- Rest API: wp_verify_nonce() fails despite receiving correct nonce value
- Update user meta via REST API?
- How to call wp plugin REST functions without curl?
- Disable part of endpoints wordpress api
- Get a term object using getEntityRecords
- How to send the body in wp_remote_post as “raw”?
- Backbone with custom rest endpoints
- rest Api jwt authentication for get methodes
- Is there a way I can fetch the WordPress Developer Code References with an API?
- Pull in ALL posts from the last two weeks using Rest API
- How to add an endpoint to WP
- How to set up the REST API to refer to media on a CDN
- 403 error when publishing a post in wordpress. Error => Publishing failed. The response is not a valid JSON response
- Cannot use WordPress Application Passwords: “code”: “rest_no_route” “status”:404 for /wp-json/wp/v2/users/me/application-passwords
- IIS Authorization Rules breaks WP REST-API and results in fail in Site Health
- How to delete all instances of the image using REST API
- REST API connection on another site with post information and permalink
- Performance of WordPress Rest API vs WordPress Feeds
- trigger WordPress rest any API call
- WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”
- WP REST API returns empty posts despite entries in wp_posts
- The REST API encountered an error in wordpress?
- Uploading picture via REST API
- How to modify the HTML output of Gutenberg block? (Youtube)
- rest api add post meta
- WordPress single page website redirect to index.html
- How to get the most recently updated orders via the REST API?
- Fetching all users that didn’t post with rest api (current version 2)
- Calling a python script from custom wordpress rest api returns null
- Autotrader API Integration
- WordPress Rest API Error 502
- Accessing secure endpoint with X-WP-Nonce?
- Return all custom taxonomy terms for post in REST API v2? Currently limited to 10 terms
- WP Rest API V2 OR Operator in URL
- how can I add an URL parameter to a rest route using register_rest_route()?
- Call to undefined function upload_is_user_over_quota()
- Rest api request throttling
- Is my WordPress site handing out sensitive information/misconfigured?
- Delete row from table using custom endpoint via API
- Fetch post by author slug
- Cant POST with REST API on WordPress
- How can I set the default ‘orderby’ and ‘order’ parameters for a REST API call?
- get the current logged in user using WooCommerce API in React App [closed]
- Problem with custom WordPress Rest API search route with query parameters
- What filtering is available for backbone.js?
- Woocommerce API for calling products by Category ID
- wordpress rest api authentication failed