Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9094659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:24:07+00:00 2026-06-16T23:24:07+00:00

I use RESTKit successfully to access a Web service. But I have problems to

  • 0

I use RESTKit successfully to access a Web service. But I have problems to map server errors (like 404, 403…) to RESTKit’s standard RKErrorMessage class. Let’s say I get the following JSON response from my service together with a 403 status code:

{"errors":{"message":"Some error message"}}

In my iOS application I try to map the errors with the help of:

RKObjectMapping *errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class
[errorMapping addPropertyMapping:[RKAttributeMapping
   attributeMappingFromKeyPath:@"message" toKeyPath:@"message"]];

statusCodes4xx = RKStatusCodeIndexSetForClass(RKStatusCodeClassClientError);

errorDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:notecardMapping 
                     pathPattern:nil keyPath:@"errors" statusCodes:statusCodes4xx];

But all I get is an error from RESTKit:

Failed mapping operation: No mappable values found for any of the attributes or relationship mappings

Where is my fault? Is it just a wrong path in the descriptor for example?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:24:09+00:00Added an answer on June 16, 2026 at 11:24 pm

    You seem to be using notecardMapping instead of errorMapping in your response descriptor. Try this:

    RKObjectMapping *errorMapping = [RKObjectMapping mappingForClass:[RKErrorMessage class]];
    
    [errorMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:nil toKeyPath:@"errorMessage"]];
    
    RKResponseDescriptor *errorDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:errorMapping
                                                                                    pathPattern:nil
                                                                                        keyPath:@"errors.message"
                                                                                    statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassClientError)];
    
    [manager addResponseDescriptorsFromArray:@[errorDescriptor]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use RestKit to receive data from my web server and storing it in
I am trying to use RestKit for communicating with a web service providing news
Is it possible use RESTKit with ASIHTTPRequest? I have been using ASIHTTPRequest but it
I have written a tab based application in Xcode/RestKit and am attempting to use
I have an app using RestKit successfully. I am building an IAP in the
I'm having problem to use RESTKIT. I have installed everything perfectly, I have been
I am writing an iPhone application and I have finally decided to use RestKit
I am designing an app that it uses the web service like posting links
I'd like to use RestKit and handle several different requests in the same class,
From my Main question at Consuming web service with RESTKIT , I've learned some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.