LogoLogo
  • Technical Direction
  • Technical overview
    • Technical Implementation
    • API Design Guide
      • Data Definitions and Standards
      • Data Transfer Objects
      • Documentation
      • Environments
      • Error Handling
      • Example API Service
      • GraphQL Naming Conventions
      • Methods
      • Naming Conventions
      • Once Only Principle
      • Pagination
      • Resource Oriented Design
      • REST Request
      • REST Response
      • Security
      • Versioning
    • Ísland.is Public Web Data Flow
    • Code Reviews
    • Code Standards
    • Monorepo
    • Project Management
    • Teamwork
    • Architectural Decision Records
      • Use Markdown Architectural Decision Records
      • Use NX
      • Continuous Integration
      • CSS
      • Branching and Release Strategy
      • Error Tracking and Monitoring
      • What API Management Tool to Consider
      • Viskuausan Static Site Generator
      • Use OAuth 2.0 and OpenID Connect As Protocols for Authentication and Authorization
      • Unified Naming Strategy for Files and Directories
      • CMS
      • Open Source License
      • What Chart Library Should We Use Across Island.is?
      • What Feature Flag Service/application Should We Use at Island.is?
      • Logging, Monitoring and APM Platform
      • ADR Template
    • Log Management Policy
  • Products
    • Island.is Authentication Service
      • Terminology
      • Integration Options
      • Authentication Flows
      • Authorising API Endpoints
      • Session Lifecycle
      • Scopes and Tokens
      • Delegations
      • Configuration
      • Tools and Examples
      • Environments
      • Test IAS with Postman
      • Using the IAS admin portal
    • Notifications / Hnipp
      • New Notification Setup Guide
      • Notifications service workflow overview
      • Email notifications
    • Pósthólfið
      • Security Checklist
      • Introduction
      • Skjalatilkynning API
      • Skjalaveita API
      • Sequence Diagram
      • Interfaces
    • Straumurinn (X-Road)
      • Architecture Guidelines for Service Providers and Consumers
      • Setting up an X-Road Security Server
        • Network Configuration
      • X-Road - Uppfærsla á öryggisþjónum
      • Straumurinn - Notkun og umsýsla
      • X-Road Central - current version
  • Development
    • Getting Started
    • Generating a New Project
    • Definition of done
    • Devops
      • Continuous Delivery
      • Database
      • Dockerizing
      • Environment Setup
      • Logging
      • Metrics
      • NextJS Custom Server
      • Observability
      • Operations Base Principles
      • Security
      • Service Configuration
      • Support
    • AWS Secrets
    • Feature Flags
    • Documentation Contributions
    • Defining Monorepo Boundaries With Tags
    • OpenAPI
    • Code Generation
    • Workspace Settings (Deprecated)
    • External Contributions
  • REFERENCE
    • Problems
      • 400 Validation Failed
      • 400 Attempt Failed
      • 403 Bad Subject
      • 400 500 Template API Error
    • Glossary
  • Misc
    • Guide: Adding a Payment Step to an Application
    • Guide: Enable Organisations to Make Requests to an Application
    • README Template
Powered by GitBook
On this page
  • Extra metadata
  • Example

Was this helpful?

  1. REFERENCE
  2. Problems

400 Attempt Failed

The server will not process the request due to validation error.

The client can try again after fixing the indicated validation issue IFF number of remainingAttempts is greater than 0.

Extra metadata

remainingAttempts

A number indicating number of remaining attempts the client can re-try the submission before needing to restart the process.

Usually used around some verification process, i.e. in a user profile collection were user needs to provide a verification code for email or phone number.

fields

Optional

A optional property which is a JSON object listing validation issues where the key is the name of the field and the value is validation issue. These fields should refer to the primary entity being validated by the endpoint, for instance query parameters for GET requests, request body for POST requests.

For nested input objects, the server can either use nested objects ({ "person": { "lastName": "Issue" } } or the path to the field ({ "person.lastName": "Issue" }).

These validation issues should be written in such a way that they can be presented to the user. As such, they should be localized according to the user locale, for example using the Accept-Language header.

Example

400 Attempt Failed
Content-Type: application/problem+json

{
  "type": "https://docs.devland.is/reference/problems/attempt-failed",
  "title": "Attempt Failed",
  "status": 400,
  "detail": "2 attempts remaining. Validation issues found in fields: smsVerificationCode.",
  "remainingAttempts": 2
  "fields": {
    "smsVerificationCode": "Verification code does not match.",
  }
}
Previous400 Validation FailedNext403 Bad Subject

Last updated 1 year ago

Was this helpful?