Skip to content

REST API endpoint for storing a URL Metric should return a 423 Locked status code instead of 403 Forbidden #1860

@westonruter

Description

@westonruter

See todo:

'permission_callback' => static function () {
// Needs to be available to unauthenticated visitors.
if ( OD_Storage_Lock::is_locked() ) {
return new WP_Error(
'url_metric_storage_locked',
__( 'URL Metric storage is presently locked for the current IP.', 'optimization-detective' ),
array( 'status' => 403 ) // TODO: Consider 423 Locked status code.
);
}
return true;
},

Metadata

Metadata

Assignees

Labels

Projects

Status

Done 😃

Relationships

None yet

Development

No branches or pull requests

Issue actions