mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 17:22:17 -05:00
Update error message
This commit is contained in:
@@ -95,4 +95,4 @@ def check_sms_content_char_count(content_count):
|
||||
def service_can_schedule_notification(service, scheduled_for):
|
||||
if scheduled_for:
|
||||
if SCHEDULE_NOTIFICATIONS not in [p.permission for p in service.permissions]:
|
||||
raise BadRequestError(message="Your service must be invited to schedule notifications via the API.")
|
||||
raise BadRequestError(message="Cannot schedule notifications (this feature is invite-only)")
|
||||
|
||||
@@ -397,4 +397,4 @@ def test_post_notification_raises_bad_request_if_service_not_invited_to_schedule
|
||||
assert response.status_code == 400
|
||||
error_json = json.loads(response.get_data(as_text=True))
|
||||
assert error_json['errors'] == [
|
||||
{"error": "BadRequestError", "message": 'Your service must be invited to schedule notifications via the API.'}]
|
||||
{"error": "BadRequestError", "message": 'Cannot schedule notifications (this feature is invite-only)'}]
|
||||
|
||||
Reference in New Issue
Block a user